MATLAB: How to solve a nonlinear non-transcendental equation numerically- I have a non-linear non-transcendental equation, I have tried vpasolve function but it does not provide correct roots, do you know how can I find the roots of such an equation? Thank

numerically solving nonlinear non-transcendental equation

(c1-c2*landa^4)*((sinh(landa*L))^2 – (sin(landa*L))^2) – (c1-c2*landa^4)*(cosh(landa*L)+cos(landa*L))^2 + c3*(cosh(landa*L)-cos(landa*L))*(sinh(landa*L)+sin(landa*L)) – (cosh(landa*L)-cos(landa*L))*(sinh(landa*L)+sin(landa*L)) = 0
% ci (c1,c2 c3), are all constant rational numbers, eqation should be solved for 'Landa'

Best Answer

I tried this
clc,clear
c1 = 1;
c2 = 2;
c3 = 3;
L = 5;
syms landa
f = (c1-c2*landa^4)*((sinh(landa*L))^2 - (sin(landa*L))^2) - (c1-c2*landa^4)*(cosh(landa*L)+cos(landa*L))^2 + c3*(cosh(landa*L)-cos(landa*L))*(sinh(landa*L)+sin(landa*L)) - (cosh(landa*L)-cos(landa*L))*(sinh(landa*L)+sin(landa*L));
F = matlabFunction(f);
x = linspace(-1,1)/3;
y = F(x);
[~,ix] = min(abs(y));
plot(x,y,x(ix),y(ix),'*r')
grid on
result