Solve 4th order ODE
Show older comments
I would like to find a solution for the differential equation with boundary conditions (solution for a buckling column on a non-linear elastic foundation):

where E, I, P, k1, and k3 are some constants
I tried to solve thos equation in Wolfram Mathematica. Wolfram Mathematica gives me only a trivial solution.
Could you please kindly help me solve this equation numerically?
function mat4bvp
L=1
xmesh = linspace(0,L,5);
solinit = bvpinit(xmesh, @guess);
sol = bvp4c(@bvpfcn, @bcfcn, solinit);
plot(sol.x, sol.y, '-o')
end
function dydx = bvpfcn(x,y)
dydx = zeros(4,1);
k1=1
k3=1
I=1;
E=1;
P=1
dydx=[y(1)
y(2)
y(3)
-y(2)*P-k1*y(1)+k3*y(1)*y(1)*y(1)]; %4th order equation
end
function res = bcfcn(ya,yb)
res=[ya(1)
ya(2)
yb(1)
yb(2)];
end
function g = guess(x)
g = [sin(x)
cos(x)
-sin(x)
-cos(x)];
end
I am trying to solve it using bvp soft, but matlab gives error: unable to solve the collacation equations -- a singular Jacobian encounered.
9 Comments
Sam Chak
on 21 Mar 2022
Can you refer to an example in the bvp4c article, and attempt to write code to solve it?
Then show us the code if you run into some technical issues.
user06261999
on 21 Mar 2022
John D'Errico
on 21 Mar 2022
Edited: John D'Errico
on 21 Mar 2022
As far as the question at hand, you need to understand the solution to that equation is TRIVIALLY solved as w(x) == 0. Mathematica told you that, and so will MATLAB. Try it. (Looks like you did.) Does w(x) == 0 satisfy the equation, and all boundary conditions? Of course. So a numerical boundary value solver will tell you the same thing, at least if you get it to work.
user06261999
on 21 Mar 2022
Torsten
on 21 Mar 2022
Maybe there are nontrivial solutions as for
w'' + w = 0, w(0) = w(2*pi) = 0
e.g., but it will be difficult to find them.
Numerical methods will most probably give w(x) = 0. Analytical methods are difficult since your equation is nonlinear.
Sam Chak
on 22 Mar 2022
Looks like the trivial solution is the only solution to the specified boundary condition.
You can test, for example
The solution
is a sinusoidal signal. See what happens if you set the boundary condition


Sam Chak
on 22 Mar 2022
Hi @Torsten
I ran some sampling solutions by fixing
&
, and a range of non-zero initial conditions for
&
. But I'm actually unsure whether the trivial solution is the only solution for
.
Perhaps the non-trivial solution exists when
. That's why I gave the example above. I think @user06261999 can continue searching for the non-trivial solution.
Torsten
on 22 Mar 2022
Let's stick to the linear case
y + y'' = 0, y(0) = y(L) = 0
The solution is the trivial solution (and is unique) if L is not a multiple of pi.
Otherwise it has an infinite number of solutions, namely y = a*sin(x).
This doesn't generalize to the nonlinear case, but I think that - if nontrivial solutions exist - they will exist only for special values of L.
The problem is somehow connected with eigenvalue problems for boundary value problems, but I don't have experience in this field.
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!