Solve system for Roots of Bessel Function
Afficher commentaires plus anciens
I have this Bessel function that I am trying to solve for the roots an and bn.They are dependent upon T ,K, B, which I was able to figure out, but I need to be able to use this in my infinite summation model, so being able to solve for more would be useful.
syms a_n b_n T K B
I tried to use vpasolve and fzero function with (T=10,B=1,K=0.5) but didnt work.
What function should i use for solving this system?
Any help would be greatly appreaciated.
Thank you
Réponse acceptée
Plus de réponses (1)
I don't know how the (an,bn) for your problem are enumerated, but maybe it's a start.
At least I can assure you that you will not be able to symbolically solve for an,bn the way you tried.
The equations are far too compliciated to allow analytical solutions.
T = 10;
B = 1;
K = 0.5;
fun = @(a,b)[(besselj(0,K*a)+b*bessely(0,K*a))*(1-T*a)+B*a*(besselj(1,K*a)+b*bessely(1,K*a));...
(besselj(0,a)+b*bessely(0,a))*(1-T*a)-B*a*(besselj(1,a)+b*bessely(1,a))];
options = optimset('TolFun',1e-12,'TolX',1e-12)
x = fsolve(@(x)fun(x(1),x(2)),[1 1],options);
a = x(1)
b = x(2)
fun(a,b)
15 commentaires
Alex Sha
le 10 Août 2022
The following results seem to be more precise:
a: 0.09975118859991
b: 0.00387367284443446
mery
le 10 Août 2022
How I can get the firs n-roots (an and bn), with n=20
This was exactly my questions: how do you want to enumerate/order your roots ?
According to a_n, starting from 0 ? And b_n follows somehow from your system ?
Or according to b_n, starting from 0 ? And a_n follows somehow from your system ?
Or another mechanism ?
mery
le 10 Août 2022
Don't you understand what I mean ?
Say you got roots as
(1 4)
(2356,-34)
(-27.5,13.66)
(0.3+6*i,24-pi*i)
What is (a1,b1),(a2,b2),(a3,b3),(a4,b4) ?
You must define an ordering/enumeration somehow in order to insert them at the correct places in your infinite sum equation !
Torsten
le 10 Août 2022
And why does
a = 0.5303
b = 1.6781
not appear in the list ?
Did you choose different values for T, B and K in Mathematica ?
So in principle, the (an,bn) are ordered according to he size of an starting from 0 ?
Torsten
le 10 Août 2022
Your function is incorrect (at least according to your equations in your original post).
fun = {(BesselJ[0, K*a] + b*BesselY[0, K*a])*(1 - T*a) -
B*a*(BesselJ[1, K*a] + b*BesselY[1, K*a]), (BesselJ[0, a] +
b*BesselY[0, a])*(1 - T*a) -
B*a*(BesselJ[1, a] + b*BesselY[1, a])}
instead of
fun = {(BesselJ[0, K*a] + b*BesselY[0, K*a])*(1 - T*a) -
B*a*(BesselJ[1, K*a] + b*BesselY[1, K*a]), (BesselJ[0, a] +
b*BesselY[0, a])*(1 - T*a) -
B*a*(BesselJ[0, a] + b*BesselY[0, a])}
First you will have to find out in which order the (an,bn) are enumerated.
Then you have to find the first - say - 30 pairs in order and save them to a file. Since they won't change for the calculation of the infinite sum, you can do this step independent of the sum calculation.
Then you can program the sum calculation after reading in the pairs (an,bn) from file.
Since the step of finding the zeros can be done beforehand, I suggest you let MATHEMATICA calculate them and you just read them in your MATLAB code from file when needed.
Torsten
le 10 Août 2022
As I said: Copy the roots from MATHEMATICA. This is the easiest way.
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
