I want to perform integration of an equation with one variable and few constants in the form of symblos namely, A,k,p whose values I have planned to enter after integration. Integrating equation with only one variable but with no other symbol(containing some constant value) is simple and direct, but for the case in which symbols are present, integration using quad
from scipy.integrate
gives an error. Actually quad()
requires the values of all symbols to be pre-defined. I want a solution where I don't have to enter the values for symbols beforehand but take an input and substitue them afterwards.
To make the problem even more clear,
I want to integrate a wave equation
A * sin(kx + wt) , where A is amplitude, w is angular velocity, t is time and x is position (x is only variable )
quad()
requires to define the values for A, k and p before integrating but what I want to do is first integrate A * sin(kx + wt) and then substitue the values for A, k and p in the result by taking user input
.
Please suggest a method to do so :)