Second Order ODE Solver using ODE23
Show older comments
I am trying to use ode23 to solve
xy''- 1y'- 8(x^3)(y^3)=0
what I have so far is.
%%%xy''-y'-8*x^3*y^3=0
%%y''= y'/x + 8y^3x^2
% y'= x(1)
% y=x(2)
%y''= x(1)/x(1) + 8*(x(2)^3)*(x(1)^2) = 1 + 8*(x(2)^3)*(x(1)^2)
yDoublePrime = @(t,x) [x(2); 1+8*(x(1)^2)*(x(2)^3)];
tspan = [1 4];
[y,yPrime]=ode23(yDoublePrime,tspan,[0.5 -0.5])
The solution to this problem is supposed to be 0.0456, but i keep getting large vectors? It's late, I am tired, What am I missing?
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!