Open rtoy opened 2 months ago
Imported from SourceForge on 2024-07-05 23:35:34 Created by villate on 2023-03-19 18:37:42 Original: https://sourceforge.net/p/maxima/bugs/4122/#1101
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)) ?
Imported from SourceForge on 2024-07-05 23:35:37 Created by storebjoern on 2023-03-22 19:05:32 Original: https://sourceforge.net/p/maxima/bugs/4122/#e3cf
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".
Imported from SourceForge on 2024-07-05 23:35:33 Created by storebjoern on 2023-03-19 17:51:49 Original: https://sourceforge.net/p/maxima/bugs/4122
Using maxima 5.46 on windows10 64-intel.
Solving
'diff(y,t)=a*(1-y^2/c^2),y,t)
withode2('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.