I am trying to solve the following ODE using the program Maple:
This ODE can easily be solved analytically on the interval [0,1/2] and the solution is given by
Now, using Maple, I got
restart;
ODE := diff(y(x),x$2)*x*abs(ln(x))-2*diff(y(x), x)=0:
initialPosition := y(0) = 0;
initialVelocity := D(y)(1/2) = 1;
solution := dsolve({ODE, initialPosition, initialVelocity})
which gives me the same solution I found earlier. However, when I try to find the solution numerically:
solution_num := dsolve({ODE, initialPosition, initialVelocity}, numeric), the program displays the following error
As far as I understand, the way Maple discretizes the ODE together with the initial condition at 0, y(0) = 0, creates an error as the program cannot handle the singularity from the log(0) appearing in the equation. They suggest to use another type of discretization to circumvent this singular endpoint: the Midpoint Method. As I am just starting with Maple and I'm not comfortable with ODEs discretization, I was wondering if there was a function implementing such an algorithm to solve my problem. Any help would be appreciated.



I put this style,etc on the plot of the exact solution only so that it can be nicely overlaid with the plot of the numeric solution.
Now, the numeric solution.
Now let's see them together.
Another (somewhat superior) way to plot that result returned by
dsolve(...,numeric).