Home > Archive > Mathematica > May 2006 > Finding roots of equalities involving Legendre Polynomials
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Finding roots of equalities involving Legendre Polynomials
|
|
| Jens Hueschelrath 2006-05-08, 4:11 am |
| Dear all,
in order to solve an electromagnetic scattering problem, I try to find
the positive roots of two equalities:
LegendreP[p, -m, Cos[theta1]] == 0
theta1 is known and m = 0,1,2,...
as well as
D[LegendreP[q,-m, Cos[theta1]], theta1] == 0
with, again, theta1 known and m = 0,1,2,...
The values of p and q are needed for series expressions like :
E = Sum_{p}[....] + Sum_{q}[....]
where p and q are all the positive roots of the equations from above. Up
to now I was unable to solve this problem with my Mathematica 5.2...
Any ideas on this?
Thanks a lot in advance!
Jens
| |
| Paul Abbott 2006-05-11, 4:16 am |
| In article <e3mip0$7d0$1@smc.vnet.net>,
Jens Hueschelrath <nospam_jens@hueschelrath.de> wrote:
> in order to solve an electromagnetic scattering problem, I try to find
> the positive roots of two equalities:
>
> LegendreP[p, -m, Cos[theta1]] == 0
>
> theta1 is known and m = 0,1,2,...
I doubt that exact solutions are possible, except for trivial cases.
Assuming that you want to compute a list of numerical roots, you could
use the RootSearch package by Ted Ersek:
http://library.wolfram.com/infocenter/MathSource/4482/
This package returns all the roots over a specified range as a list of
replacement rules.
Alternatively, the more elementary RootsInRange function that appeared
in "Finding Roots in an Interval" in The Mathematica Journal 7(2), 1998)
should be sufficient:
Needs["Utilities`FilterOptions`"]
RootsInRange[d_, {l_, lmin_, lmax_}, opts___] :=
Module[{s, p, x, f = Function[l, Evaluate[d]]},
s = Plot[f[l], {l, lmin, lmax}, Compiled -> False,
Evaluate[FilterOptions[Plot, opts]]];
p = Cases[s, Line[{x__}] -> x, Infinity];
p = Map[First, Select[Split[p, Sign[Last[#2]] == -Sign[Last[#1]] & ],
Length[#1] == 2 & ], {2}];
Apply[FindRoot[f[l] == 0, {l, ##1},
Evaluate[FilterOptions[FindRoot, opts]]] &, p, {1}]
]
Then you would evaluate, e.g.,
RootsInRange[LegendreP[p, -2, Cos[0.3]], {p, 0, 100}]
If you need more roots and higher precision,
RootsInRange[LegendreP[p, -2, Cos[0.3]], {p, 0, 300},
PlotRange -> All, WorkingPrecision -> 30]
I note that the spacing between the roots appears to be approximately
constant for fixed theta.
> as well as
>
> D[LegendreP[q,-m, Cos[theta1]], theta1] == 0
>
> with, again, theta1 known and m = 0,1,2,...
Note that Mathematica can compute and simplify this derivative:
der[q_,m_][theta_]= Simplify[D[LegendreP[q, -m, Cos[theta]], theta]]
Then you would just use
RootsInRange[der[q, -2][0.3], {q, 0, 100}]
> The values of p and q are needed for series expressions like :
>
> E = Sum_{p}[....] + Sum_{q}[....]
>
> where p and q are all the positive roots of the equations from above.
Clearly, you can use the approach above to compute the truncated sums.
Also, are you aware of "Spheroidal Wave Functions in Electromagnetic
Theory" by W Li, XK Kang, & MS Leong (New York: Wiley), 2001? The codes
from this book are available at
http://www.ece.nus.edu.sg/stfpage/elelilw/Codes.htm
Cheers,
Paul
________________________________________
_______________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
| |
| Jens Hueschelrath 2006-05-30, 4:15 am |
| Paul Abbott wrote:
> In article <e3mip0$7d0$1@smc.vnet.net>,
> Jens Hueschelrath <nospam_jens@hueschelrath.de> wrote:
> Note that Mathematica can compute and simplify this derivative:
>
> der[q_,m_][theta_]= Simplify[D[LegendreP[q, -m, Cos[theta]], theta]]
Dear Paul,
your hints turned out to be very helpful to me, thank you very much for
that! But there remains one problem that I was not yet able to solve.
The derivative, as you define it above works well as long it is
performed on 'theta'.
Unfortunately, the expression I try to compute is also using derivatives
with respect to 'q'. I tried to evaluate
Simplify[D[LegendreP[q,1,Cos[theta]],q] or
Simplify[D[LegendreP[q,1,Cos[theta]],the
ta0, q]
in Mathematica, but without any success. The only idea I have on this is
to use a series expansion of LegendreP and to differentiate this series...
best regards
Jens
|
|
|
|
|