Please help me to solve this ordinary differential equation

184 Views Asked by At

I want to solve this ode in matlab numerically. A,B,C,D,E,F,Genter image description here are constant values. I think that in matlab bvp4c command can solve this ode. I studied matlab help related to the bvp4c command but I could not understand how to write it for this problem. I would be appreciated if any one could help me and write me the commands in matlab. The picture of ode is presented below. Regards, Nima Sina

1

There are 1 best solutions below

2
On

Rather than doing your problem, I will show how to solve a problem of the same size. Consider the BVP:

$$\frac{d^6 y}{dx^6} + 2 \frac{d^5 y}{dx^5} + 3 \frac{d^4 y}{dx^4} + 4 \frac{d^3 y}{dx^3} - 2 \frac{d^2 y}{dx^2} + 7 \frac{dy}{dx} - 5y = 1 \\ \frac{d^5y}{dx^5}(0) + \frac{d^2 y}{dx^2}(0) + y(0) = 0 \\ y(0)=0 \\ \frac{dy}{dx}(0)=0 \\ y(2)=0 \\ \frac{dy}{dx}(2) = 0 \\ \frac{d^3y}{dx^3}(2)=0. $$

Then you can do the following:

odefun=@(x,y) [y(2);y(3);y(4);y(5);y(6);1 + 5*y(1) - 7*y(2) + 2*y(3) - 4*y(4) - 3*y(5) - 2*y(6)];
bcfun=@(ya,yb) [ya(6)+ya(3)+ya(1);ya(1);ya(2);yb(1);yb(2);yb(4)];
solinit=bvpinit([0;2],zeros(6,1))
sol = bvp4c(odefun,bcfun,solinit);