Asked • 07/12/19

How to integrate without limits in SymPy?

I am given `p(x) = 2ax^2 - b` and asked to integrate it twice, but I'm not given limits. However, when I just use `integrate`, I'm not given a constant of integration, which is crucial to the next step. Since I don't have limits, using `scipy.integrate.dblquad` didn't work. Instead, I am importing `integrate` from SymPy and doing two separate integrals. This is what I have: from sympy import integrate x = Symbol('x') a = 240 b = 160 f = 2*a*x**2 - b g = integrate(f) h = integrate(g) What I want to get is: g = 160*x**3 - 80*x**2 + C h = 40*x**4 - 80*x**2 + Cx + c where `C` and `c` are constants of integration. My code currently produces the equations without the constants.

1 Expert Answer

By:

Arun V. answered • 09/06/19

Tutor
0 (0)

Science and Math Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.