In particular, tanh(x + I*pi/2) = coth(x) and coth(x + I*pi/2) =
tanh(x). You can verify this with SymPy:

In [22]: x = Symbol('x', real=True)

In [23]: tanh(x + I*pi/2).expand(complex=True).simplify()
Out[23]:
   1
───────
tanh(x)

In [24]: 1/tanh(x + I*pi/2).expand(complex=True).simplify()
Out[24]: tanh(x)

But note that the arbitrary constant in the solution of your ODE is
like coth(a*t + C1). So the solution represents both tanh() and
coth(), depending on the value of C1.

Aaron Meurer


On Tue, Jun 28, 2016 at 12:59 PM, Aaron Meurer <[email protected]> wrote:
> 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%3D6L-poqFJYs4dVnnuxcdLHn%2BOU2VWQBFN9uYnhxdCa9LMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to