Ask Your Question

Revision history [back]

click to hide/show revision 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) + \log y = -i\pi + 3x -2\log 2\ .$$

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\pi}$ becomes real. Explicitly: $$\frac y{2y-3} = -\frac 14 e^{3x}\ .$$ Equivalently: $$\frac {2y-3}y = -4 e^{-3x}\ .$$ The LHS is $2-\frac 3y$, and we can easily extract $y$ from here, $$ y = \frac 32\cdot\frac 1{1+2e^{-3x}}\ .$$ (The Mathematica solution, and the following one coincide with the above, after amplification with $e^{3x}$.) 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)]