The reason this is happening is that both tanh(x) and coth(x) satisfy
the same differential equation, namely f'(x) = 1 - f(x)**2, because
d/dx tanh(x) = 1 - tanh(x)**2 and d/dx coth(x) = 1 - coth(x)**2. This
is your ODE (up to a change in variable).

Aaron Meurer

On Tue, Jun 28, 2016 at 12:54 PM, Aaron Meurer <[email protected]> wrote:
> According to checkodesol(paraChute, solution), the solution is correct.
>
> Aaron Meurer
>
> On Tue, Jun 28, 2016 at 2:13 AM, Dan Lewis <[email protected]> wrote:
>> Hi folks,
>>
>> Looks like sympy/dsolve produces an incorrect solution to an ODE:
>>
>> from sympy import *
>>
>> mass, g, b, t = symbols('mass g b t')
>>
>> v, x = symbols('v x', cls=Function)
>>
>> paraChute = mass*v(t).diff(t)-mass*g+b*(v(t))**2
>>
>> solution = dsolve(paraChute,v(t),hint='lie_group')
>>
>> solution
>>
>> Out[1]:
>>
>> Eq(v(t), sqrt(g)*sqrt(mass)/(sqrt(b)*tanh(sqrt(b)*sqrt(g)*(C1*mass +
>> t)/sqrt(mass))))
>>
>>
>> Sorry in advance if I'm doing something silly - the solution shouldn't be
>> 1/tanh.  Should be tanh.
>>
>> --
>> 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/92f8fe37-45df-4cc0-9ebc-7330f0bb20d9%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAKgW%3D6K1gZKPkR4ZXaCL_WAVYUZ_1cW-G_KWWeHNmfio8iurgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to