how to solve such transcendental equation?
Show older comments
(rhoL/rhoA*L)*(1-(ka/ks)^2+(ky*L/(ks*L))^2)*(ky*L) = 1/tan(ky*L);
ka=f/C1, ks=f/C2
rhoL,rhoA,L,C1 and C2 are constants
f has a range from (0,10000).
ky can be real, imaginary or complex. how to solve for the complete set of ky?
Answers (1)
There are several ways to go about this. One is to use FZERO. Since you didn't actually give the values for the constants, I'll show you a different example.
Solve this equation for x on [0 10]: exp(-x)*x^2 = sin(x)/x
% First write it as a vectorized anonymous function.
% Solving the equation for zero.
f = @(x) exp(-x).*x.^2 - sin(x)./x; % Notice the dots (.)
% Now we plot it to get an idea of where the zeros are.
x = 0:.01:10;
plot(x,f(x)) % Look for the zeros - looks like 3.
% Now find the roots.
cnt = 1;
for ii = [2,6.5,9.5] % This vector has the guesses.
rt(cnt) = fzero(f,ii); % Pass each guess to FZERO.
cnt = cnt + 1;
end
Let's look at the roots:
rt % Display the roots. Match our guesses? (Yes)
Now just do the same with your equation....
3 Comments
Rui
on 23 Oct 2012
You still have not given enough information for me to copy/paste and see if I can get results, but let's give it a try with your generic function:
afa = 3i+4;
f = @(x) afa*x.^3-1./tan(x);
newtzero(f)
ans =
0.6379 - 0.0954i
-0.6379 + 0.0954i
Also, you can use the solve function if you want more digits:
syms x
solve((3i+4)*x.^3-1./tan(x))
Walter Roberson
on 23 Oct 2012
It is difficult to provide rigorous solving methods without knowing the ranges of each of the constants.
I could do a piecewise analysis of all of the combinations of possibilities and maybe come up with a complete method of finding all of the roots without any advanced constraints being known, but I don't think that would be a productive use of my time.
Categories
Find more on Common Operations 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!