Solving 4th order nonlinear Differential Equation using bvp4c
Show older comments

I am new to matlab and I want to solve above equation using matlab bvp4c.
The boundary conditions are -
,
,
,
.
,
,
,
.I want to plot the following graph( only the bottom cure and not all the curves) -

But my code gives a different graph.
Can anyone please help me?
The matlav code i am trying is as follows-
function dxdy = mat4ode(~,y)
E=169e9; % YMod
w=10e-6; % Width of beam
t=2e-6; % Thickness of beam
I=(w*(t^3))/12; % Moment of intertia
V=2.3; % Voltage
e0=8.854187817e-12; % VPerm
e1 = 7.5*e0;
d1 = 20e-9;
h0=2e-6;
qx = (V^2*w/(2*E*I))*(1 + 0.65*(h0+y(1))/w)/(e0*( d1/e1 + (h0+y(1))/e0 )^2);
dxdy=[y(2)
y(3)
y(4)
qx]; %4th order equation
end
function res = mat4bc(ya,yb)
res=[ya(1) % u=0 at x=0
ya(2) % du/dx=0 at x=0
yb(3) % d2a/dx2=0 at x=L
yb(4)]; % d3a/dx3=0 at x=L
end
function mat4bvp
options = bvpset('RelTol', 1e-8, 'AbsTol', 1e-8);
i =0;
solinit = bvpinit(linspace(0,450e-6,100),[i i i i]); % Range of x and the Initial guess
sol = bvp4c(@mat4ode,@mat4bc,solinit,options);
x = linspace(0,450e-6);
y = deval(sol,x);
h = 2e-6 - y(1,:);
plot(1e6*sol.x,1e6*h);
xlim([0,450])
ylim([0,2])
end
1 Comment
Sumit Yelpale
on 26 Apr 2021
Answers (0)
Categories
Find more on Boundary Value Problems 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!