title: Returning the results of an integral as a function
body: <p>I am trying to calculate the integral of a function where the results of another integral is implemented. It looks a bit like the following:</p>
  <pre><code>import numpy as np
  import scipy.integrate as integrate
  
  Formula_U=lambda t: 325 * np.sin(100 * np.pi * t -3)
  Formula_I=lambda t: 100 * np.sin(100 * np.pi * t -3)
  
  #To calculate:
  Integral on [0,1] of ( Formula_I * INTEGRATED(Formula_U) )
  
  Results = integrate.quad(Formula_I * ~~integrate.quad(Formula_U)~~ ,0,1)[0]
  </code></pre>
  <p>The part between the ~~...~~ doesn't work. I know integrate.quad doesn't support this, but I'm looking for something that returns the integrated formula &quot;Formula_U&quot; as a <strong>formula</strong> instead of a value, so the given integral can be calculated dynamically.</p>
  <p>I've tried looking into other post, but I can't find anything on calculating the integral of a formula without limits. I've tried hardcoding the integral as a separate variable with lambda, but the input sine wave changes as soon as I add a few harmonic sine waves to the equation, so that's not an option.</p>
  <p>I've tried doing something with sympy, but I don't know how to translate a string into a variable using lambda.</p>
  <p>Thanks in advance!</p>