Question: Plot of a result curve

I would like to experiment with error estimation in the symbolic solution of ordinary differential equations. I've written a simple example in the attached file. I would now like to plot both the left side of the ODE and the solution y(x) together in the same coordinate system. I can't do this, and I'm asking for help. How can the cumbersome numerical terms in the solution y(x) be converted to floating-point numbers?

As I said, this is a recreational experiment ;-) .DGL_test.mw

restart

ode := x^2 = sum(x*(diff(y(x), [`$`(x, i)]))/factorial(i), i = 0 .. 3)

x^2 = x*y(x)+x*(diff(y(x), x))+(1/2)*x*(diff(diff(y(x), x), x))+(1/6)*x*(diff(diff(diff(y(x), x), x), x))

(1)

``

``

ics := y(0) = 0, (D(y))(0) = 0, ((D@@2)(y))(0) = 0

y(0) = 0, (D(y))(0) = 0, ((D@@2)(y))(0) = 0

(2)

dsolve({ics, ode})

y(x) = x-1+((1/12)*(2-2^(1/2))*(1+2^(1/2))^(2/3)+(1/12)*2^(1/2)*(1+2^(1/2))^(1/3)+1/3)*exp(((1+2^(1/2))^(2/3)*2^(1/2)-(1+2^(1/2))^(2/3)-(1+2^(1/2))^(1/3)-1)*x)+((1/12)*(2^(1/2)-2)*(1+2^(1/2))^(2/3)-(1/12)*2^(1/2)*(1+2^(1/2))^(1/3)+2/3)*exp(-(1/2)*((1+2^(1/2))^(2/3)*2^(1/2)-(1+2^(1/2))^(2/3)-(1+2^(1/2))^(1/3)+2)*x)*cos((1/2)*3^(1/2)*(1+2^(1/2))^(1/3)*(2^(1/2)*(1+2^(1/2))^(1/3)-(1+2^(1/2))^(1/3)+1)*x)-3^(1/2)*(-1+(2^(1/2)-1)*(1+2^(1/2))^(1/3))*2^(1/2)*exp(-(1/2)*((1+2^(1/2))^(2/3)*2^(1/2)-(1+2^(1/2))^(2/3)-(1+2^(1/2))^(1/3)+2)*x)*sin((1/2)*3^(1/2)*(1+2^(1/2))^(1/3)*(2^(1/2)*(1+2^(1/2))^(1/3)-(1+2^(1/2))^(1/3)+1)*x)/((1+2^(1/2))^(2/3)*(12*2^(1/2)-12))

(3)

NULL``

Download DGL_test.mw

Please Wait...