> restart; 1; read
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

>
>
#-----------------------------------------------------------------------
# Let's try the first-order ODE where I dropped the mod sign on the LHS:
#-----------------------------------------------------------------------
> ode:=y*diff(v(y),y)-(2*v(y)-2);
`+`(`*`(y, `*`(diff(v(y), y))), `-`(`*`(2, `*`(v(y)))), 2)
> soln:=dsolve(ode,v(y));
v(y) = `+`(`*`(_C1, `*`(`^`(y, 2))), 1)
>
>
#-----------------------------------------------------------------------
# Go figure! (Consider the two cases for the mod separately; turns out
# the above is "general"; we just drop the assumption on the constant
# being positive!
#-----------------------------------------------------------------------
>
########################################################################
>
#-----------------------------------------------------------------------
# Full ODE: Note Maple misses the "other" family of solutions: constants
#-----------------------------------------------------------------------
> ode2:=y(x)*diff(y(x),x$2)-2*diff(y(x),x)^2-2*diff(y(x),x);
`+`(`*`(y(x), `*`(diff(diff(y(x), x), x))), `-`(`*`(2, `*`(`^`(diff(y(x), x), 2)))), `-`(`*`(2, `*`(diff(y(x), x)))))
>
> soln2:=dsolve(ode2,y(x));
y(x) = `+`(`-`(`*`(_C1, `*`(tanh(`/`(`*`(`+`(_C2, x)), `*`(_C1)))))))
>
>
#-----------------------------------------------------------------------
# Look: constants solve the ODE too! Maple, you are stupid!
#-----------------------------------------------------------------------
> y_test:=A;
A
> eval(subs(y(x)=y_test,ode2));
0
>
>
>
#-----------------------------------------------------------------------
# Does the "general" (not!) solution obtained by maple approach a
# constant for extreme values of one of the constants? Obviously only
# _C1 has the potential to do this since _C2 just shifts the origin of x.
#-----------------------------------------------------------------------
> assign(soln2);
> plot({subs(_C2 = 1, _C1 = 0.1, y(x)),
>       subs(_C2 = 1, _C1 = 1, y(x)),
>       subs(_C2 = 1, _C1 = 10, y(x))},
>       x = -5 .. 5);
Plot_2d
>
> plot(subs(_C2 = 1, _C1 = 100, y(x)),
>       x = -5 .. 5);
Plot_2d
>
#-----------------------------------------------------------------------
# Doesn't look promising... Let's consider the formal limits:
#-----------------------------------------------------------------------
> limit(y(x), _C1 =  infinity);
`+`(`-`(_C2), `-`(x))
> limit(y(x), _C1 = -infinity);
`+`(`-`(_C2), `-`(x))
> limit(y(x), _C1 = 0);
limit(`+`(`-`(`*`(_C1, `*`(tanh(`/`(`*`(`+`(_C2, x)), `*`(_C1))))))), _C1 = 0)
>
 

>