Menu

#4122 ode2('diff(y,t)-a*(1-y^2/c^2),y,t);

None
open
nobody
ode2 (2)
5
2023-03-22
2023-03-19
Bjørn
No

Using maxima 5.46 on windows10 64-intel.

Solving 'diff(y,t)=a*(1-y^2/c^2),y,t) with ode2('diff(y,t)-a*(1-y^2/c^2),y,t) immediately results in
(c*log(y+c)-c*log(y-c))/(2*a)=t+%c.

For c>y, especially y=0 (at t=0), the value for log(y-c) is not defined.
But the initial ode results for y=0, t=0 in the simple equation y'(0)=a.

Such I was expecting an ode2 result like
(c*log(c+y)-c*log(c-y))/(2*a)=t+%c.

Using "assume(c>y)" did not change the misleading (but for y>c correct) result.

I'd assume that maxima forces at least the question "c>y ?" or similar when ode2 solves the ode.

Discussion

  • Jaime E. Villate

    I believe it's because integrate(1/(y-c),x) is log(y-c), the same way that integrate(1/y,y) is log(y). The question here is: should the result of integrate(1/y,y) be log(abs(y)) ?

     
  • Bjørn

    Bjørn - 2023-03-22

    diff(log(y(t)),t) produces 'diff(y(t),t,1)/y(t). But same result is also produced by diff(log(-y(t)),t).

    Proposal:
    Such integrate('diff(y(t),t,1)/y(t),t) should ask whether y(t)is positive or negative and return log(y(t)) for "positive" and log(-y(t))for "negative".

     

    Last edit: Bjørn 2023-03-31

Log in to post a comment.