Need to solve first order non-linear differential equation

1 view (last 30 days)
I need to solve first order non-linear differential equation to find the wave numbers of a Timoshenko beam for a certain slenderness ratio. I am actually trying to replicate the results of a paper.
Here is the code I have to do this:
%%%%%%
n1=1;
a0=1.875104068867879;
gamm=2.205;
syms a K real;
s = 1/K;
temp = a^2*(gamm^4+1)+s^2*(1+gamm^2);
b = sqrt(-temp+sqrt(temp^2-4*gamm^2*(gamm^2*a^4-a^2*s^2*(1+gamm^2))))/(sqrt(2)*gamm);
syms B real;
F1 = (a^2-B^2)*sin(a)*sinh(B)-a*B*(a^4+a^4*gamm^4+4*gamm^2*a^2*B^2+B^4*gamm^4+B^4)*cos(a)*cosh(B)/((B^2+gamm^2*a^2)*(a^2+gamm^2*B^2))-2*a*B;
dF1da = diff(F1, 'a');
dF1db = diff(F1, 'B');
dbdk = diff(b, 'K');
dbda = diff(b, 'a');
B = b;
dadk1 =eval(-dF1db*dbdk/(dF1da+dF1db*dbda));
f1=@(K,a) eval(dadk1);
%%The left boundary condition is undetermined for 0, so I can only put a %%number close to 0
for m=1:n1
options=odeset('MaxStep',0.01);
[K2,A(:,m)]=ode45(f1,[0.00001 0.4],a_bernoulli(m),options);
end
figure();
hold on;
grid on;
axis([0 0.4 0 12]);
for m=1:n1
plot(K2, A(:,m));
end
%%%%%
thank you

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!