![]() | 1 | initial version |
I tried more exactly (instead of that 0.5
):
sage: x = var('x')
sage: y = function('y')(x)
sage: p5sol2 = desolve( diff(y,x) == 3*y - 2*y^2, y, ics=[0, 1/2], show_method=True )
sage: p5sol2
[-1/3*log(2*y(x) - 3) + 1/3*log(y(x)) == -1/3*I*pi + x - 2/3*log(2),
'separable']
The offered implicit solution can now be rewritten, we multiply with 3, we apply exp on both sides, then we can isolate y. Explicitly, after multiplying with 3... −log(2y−3)+logy=−iπ+3x−2log2 .
sage: p5sol2 = desolve( diff(y,x) == 3*y - 2*y^2, y, ics=[0, 1/2] )
sage: 3 * p5sol2
-log(2*y(x) - 3) + log(y(x)) == -I*pi + 3*x - 2*log(2)
The rôle of i is now simple to figure out, we apply exp and e−iπ becomes real. Explicitly: y2y−3=−14e3x . Equivalently: 2y−3y=−4e−3x . The LHS is 2−3y, and we can easily extract y from here, y=32⋅11+2e−3x . (The Mathematica solution, and the following one coincide with the above, after amplification with e3x.) Let us do this with code:
sage: solve( exp(-log(2*y(x) - 3) + log(y(x))) == exp(-I*pi + 3*x - 2*log(2)), y(x) )
[y(x) == 3/2*e^(3*x)/(e^(3*x) + 2)]