# Solving NLODE with substitution

I am trying to get a solution to a non-linear ODE, below is the code that works for my problem.

s = NDSolve[{y'''[x] + y[x]^2 y''[x] - y'[x] == 0, y[0] == 0, y'[0] == 0, y''[1] == 1}, y, {x, 0, 1}];
Plot[Evaluate[{y[x], y'[x], y''[x]} /. s], {x, 0, 1}]


1 Question how do you get the equations of the lines that are being plotted? So say on x from 0 to 1 what is the equation of the line.

2 How do solve the same problem but using a substitution of u=dy/dx?

u''[x] + y[x]^2 u'[x] - u[x] == 0, u[0] == 0, u'[1] == 1


and we need to integrate to get the y value, not sure how to set that as a BC as well.

Thank you

• equation of the line is s , it is InterpolatingFunction. type s to see it. You do not need to solve the problem again. The derivative is already here. You can either take derivative of the solution, of change y by y,y' in the NDSOlve itself, and NDSolve will return y' as well as y Commented Dec 1, 2013 at 8:26
• I see that the solution is in s, and when I type s it gives me this InterpolatingFunction. I looked at the documentation, I do not see how to get a numeric equation of the line. Commented Dec 1, 2013 at 17:23
• Right, I can get the value of y[x] from the first two lines of code. This is what I have, but does not seem to work, $NDSolve[{u''[x] + y[x]^2 u'[x] - u[x] == 0, u[0] == 0, u'[1] == 1}, {x}, {x, 0, 1}]$ Commented Dec 1, 2013 at 17:27

s = NDSolve[{y'''[x] + y[x]^2 y''[x] - y'[x] == 0, y[0] == 0, y'[0] == 0, y''[1]== 1}, y, {x, 0, 1}];