Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: complicated equation including bessel functions
Replies: 22   Last Post: May 8, 2013 2:43 PM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,709 Registered: 11/8/10
Re: complicated equation including bessel functions
Posted: May 8, 2013 4:18 AM

"ghasem " <shaban_sadeghi@yahoo.com> wrote in message <kmbkid\$pni\$1@newscl01ah.mathworks.com>...
> Hi.
> how solve an complicated equation including bessel functions,when my unknown and my initial guesses are complex?
> my code is as following: (is within a for loop)
>
> syms bet % bet is my unknown
> for i = 1: 100
> % eps1 , k1,k2,k0 are complex constant.
> gam = sqrt(bet^2 - k1^2);
> T = sqrt(bet^2 - k2^2);
> tau = sqrt(bet^2 - k0^2);
> %
> X1 = gam*besseli(0,gam);
> X2 = T*(eps1*besseli(1,gam)-(1-eps1)*gam.*besseli(0,gam));
>
> X3 = -T*tau*bessely(0,T)*besselk(1,tau)-...
> tau^2*bessely(1,T)*besselk(0,tau);
> X4 = -T*tau*besselj(0,T)*besselk(1,tau)-...
> tau^2*besselj(1,T)*besselk(0,tau);
>
> exp1(i) = X1.*(besselj(1,T).*X3 - bessely(1,T).*X4)-...
> X2.*(besselj(0,T).*X3 - bessely(0,T).*X4);
>
> my_guess = (i/100) +1j*(k0+(i/m));
> exp2(i) = fsolve(@(bet)eval(exp1(i)),guess);
>
> real_ans(i) = real(exp2(i));
> imag_ans(i)= imag(exp2(i));
> end
> ====================================
> I think that fsolve is not exact.because my answers are not simillar to my reference.
> is there any better method,instead fsolve?
> ghasem

What variables are changed within your for-loop ?
The complex constants eps1, k0, k1 and k2 ?

Best wishes
Torsten.

Date Subject Author
5/7/13 ghasem
5/8/13 ghasem
5/8/13 Torsten
5/8/13 Bruno Luong
5/8/13 Torsten
5/8/13 ghasem
5/8/13 Bruno Luong
5/8/13 ghasem
5/8/13 Nasser Abbasi
5/8/13 Bruno Luong
5/8/13 ghasem
5/8/13 Torsten
5/8/13 ghasem
5/8/13 Torsten
5/8/13 Bruno Luong
5/8/13 ghasem
5/8/13 Bruno Luong
5/8/13 ghasem
5/8/13 Steven Lord
5/8/13 ghasem
5/8/13 Steven Lord
5/8/13 ghasem
5/8/13 ghasem