MATLAB: How to solve transcendental equations in matlab

computationalmathematicsmatlab functionmatrix manipulationphysicstranscendental equations

I am practicing solving transcendental equations in matlab I have the given equation and I want to solve for x
tan(((0.9)*pi/w)*sqrt(1.468^2-x.^2))- sqrt((x.^2-1.458^2))/(sqrt(1.468^2-x.^2))==0
plotting w varies from 1.55 to 5 I tried all day but I cannot find solution, I tried with fzero(fun,xo) without success any suggestion?

Best Answer

This is a complex-valued function. Just from visual inspection, it is apparent that the real part of this function has infinitely many solutions. The imaginary part, however, appears to have a finite number of zeros. Are those the solutions you are looking for?
x=linspace(-2*pi,2*pi,1E4);
w=1.55;
f=tan(((0.9)*pi/w)*sqrt(1.468^2-x.^2)) - sqrt((x.^2-1.458^2))./(sqrt(1.468^2-x.^2));
figure('color','w')
plot(x,real(f))
hold on
plot(x,imag(f))
set(gca,'YLim',[-10 10])