how to solve such transcendental equation?

(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?

3 Commenti

What values do the constants have?
you can simplify the equation as f = @(x) afa*x^3-1/tan(x). adjust afa to make the solution contain a imaginary part
Have a look at the comments in my answer.

Accedi per commentare.

Risposte (1)

Matt Fig
Matt Fig il 23 Ott 2012
Modificato: Matt Fig il 23 Ott 2012
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 Commenti

I hope things would be as easy as you listed there. The problem is the roots can be real, imaginary or complex and It's not possible to guess the approximate roots. I tried eval(solve()), it's not only slow but also gives merely the first root.
Matt Fig
Matt Fig il 23 Ott 2012
Modificato: Matt Fig il 23 Ott 2012
In that case, have a look at this function: NEWTZERO.
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))
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.

Accedi per commentare.

Categorie

Scopri di più su Optimization in Centro assistenza e File Exchange

Richiesto:

Rui
il 23 Ott 2012

Community Treasure Hunt

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

Start Hunting!

Translated by