A physics teacher on an online course [presented][1] this integral,
$$
= \frac{1}{4\pi\epsilon_0} \frac{Q x}{L}
\int _{-L/2}^{L/2} \left(\frac{dy}{(x^2+y^2)^{3/2}} \right) \hat{x}
$$
and said she solved it with Wolfram Alpha, which gave
$$
= \frac{1}{4\pi\epsilon_0} \frac{Q}{x \sqrt{x^2 + (L/2)^2}}\hat{x}
$$
I was wondering how to solve this using any other symbolic software like
Sympy. I tried this for the indefinite integral,
from sympy import integrate, sqrt, Symbol, pprint
y = Symbol('y')
x = Symbol('x')
print (integrate('1/ ((x**2+y**2)**(3/2))',y))
Result is
y/(x**3*sqrt(1 + y**2/x**2))
I plugged in the limits,
from sympy import simplify
L = Symbol('L')
x = Symbol('x')
simplify((L/2)/(x**3*sqrt(1 + (L/2)**2/x**2)) - \
(-L/2)/(x**3*sqrt(1 + (-L/2)**2/x**2)))
I get
2*L/(x**3*sqrt(L**2/x**2 + 4))
which does not look right. Does anyone have any experience solving
integrals such as the one above using symbolic software?
[1]: https://youtu.be/pJwg2Bk0BDE?t=1286
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/16ad42e1-4972-46e2-8860-2bb96137f265%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.