MATLAB: Finding Solution of an equation with hyperbolic functions within an interval

expressionfsolvefzerohyperbolicnon-linearrangesolvetrigonometric

2*cos(403*x)*sinh(403*x) + 2*cosh(403*x)*sin(403*x) = 0 % this is the expression
I want to find the solutions to this expression in the range of [0, 0.2]. I tried fsolve, fzero, solve, and every other function that I could find. If I cant get all the correct answers in a single try, how can i find the first solution other than x = 0 and then use any other method like Newton-Raphson or some other methods?
Thank You

Best Answer

First draw a graph of the function to see roughly where the roots are, then use fzero:
f = @(x) 2*cos(403*x).*sinh(403*x) + 2*cosh(403*x).*sin(403*x);
xp1 = fzero(f,0.005);
xp2 = fzero(f,0.015);
x = 0:0.0001:0.02;
y = f(x);
plot(x,y,xp1,0,'o',xp2,0,'o'),grid
axis([0 0.02 -150 100])