Wrong solution/output for differential equation

When running the following code, one obtains a wrong output:

y=function('y')(x)
desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1]).factor()


The output is 1/4*x^4*(log(x) - 2)^2 instead of 1/4*x^4*(log(x) + 2)^2. Mathematica however outputs both (by running DSolve[{D[y[x], x] == 4*y[x]/x + x*Sqrt[y[x]], y[1] == 1}, y[x], x]).

edit retag close merge delete

1
1. The problem is specific to maxima :

• sympy has another, distinct, failure.

• fricas fails entirely.

• giac gives an acceptable answer.

2. You should follow the steps suggested in the documentation, possibly also reporting this bug against maxima.

( 2019-01-15 08:42:01 +0200 )edit

How do you "access" those answers? For example, desolve(diff(y)==4*y/x+x*sqrt(y),y,ics=[1,1],algorithm="giac") gives ValueError: unknown algorithm giac.

( 2019-01-15 21:54:02 +0200 )edit
1

giac("desolve([y'=4*y/x+x*sqrt(y),y(1)=1],y)").sage() should give you [1/4*(ln(x) + 2)^2*e^(4*ln(x))].

( 2019-01-16 09:16:32 +0200 )edit