Oscar,
Thanks again for your response and clarification,
> If you want to do sqrt(P(x)) with P(x) polynomial of degree k then I
> think you can have general solutions for k=1,2,3 and 4 (assuming P(x)
> has no repeated roots). Sympy can do k=1 and should be able to do 2
> with a bit of help. For
On 15 February 2016 at 15:01, Andrew Corrigan wrote:
> Thank you both for your replies. I'm not sure I follow the discussion to be
> honest as to how it applies to my original problem. In particular:
>>>
>>> Distilling this down you want to compute the integral of the
Your are talking about reduction to elliptic integrals -
https://en.wikipedia.org/wiki/Elliptic_integral
I do not think that sympy can currently do this (it would be a great
project)!
On Mon, Feb 15, 2016 at 10:01 AM, Andrew Corrigan wrote:
> Thank you both for
Thank you both for your replies. I'm not sure I follow the discussion to
be honest as to how it applies to my original problem. In particular:
> Distilling this down you want to compute the integral of the square
>> root of a quadratic
>
> I'm not sure that is accurate. If you are just
It looks like it can do it if you complete the square manually. So we just
need to have better support for doing this in the algorithm(s).
In [7]: integrate(sqrt(((x + S(1)/2)**2 + S(3)/4)), x)
Out[7]:
On 14 February 2016 at 15:17, Andrew Corrigan wrote:
> I'm having trouble computing a definite integral involving the sqrt of a
> non-negative expression, as implemented below (computing the length of a
> quadratic line in 2D). It seems to fail. I've generally had
I'm having trouble computing a definite integral involving the sqrt of a
non-negative expression, as implemented below (computing the length of a
quadratic line in 2D). It seems to fail. I've generally had success using
sympy for integration, except for when a sqrt is present.
If anyone has