Reputation: 101
I am trying to solve a complex integral equation including an infinite continued fraction.
Continued fraction to order n=50
$Version
(*14.2.0 for Microsoft Windows (64-bit) (December 26, 2024)*)
Clear["Global`*"]
frac[x_?NumericQ, y_?NumericQ, b_?NumericQ] := ContinuedFractionK[1,1 - 1/(x + I y) + ContinuedFractionK[-(b^2/(x + I y)^2) (t^2 - 1)/t^2 n(n + 2)/(4 (n + 1)^2- 1), 1 - 1/(x + I y), {n, 1, 50}], {n,1,1}]// ComplexExpand
Equation to be solved which contains the integral of the continued fraction for z=20
z = 20;
equation[x_?NumericQ, y_?NumericQ, b_?NumericQ] := 1 - b^2/(x + I y)^2 - z^2 /(3 BesselK[2, z] (x + I y)^2) NIntegrate[(t^2 - 1)^(3/2)/t frac[x, y, b] Exp[-z t],{t,1, Infinity}] // ComplexExpand
In order to proceed step by step, I have three questions to ask Mathematica
- First: reformulate the continued fraction frac[]
as a real part Re[frac]
plus an imaginary part Im[frac]
- Second: find the correct starting points for x
and y
for equation[]
to include in FindRoot
- Third: find and plot all the real and imaginary roots x(b)
and y(b)
in function of the parameter b
, with 0.01 =< b =< 20
roots[b_] := {x, y} /.FindRoot[{Re[equation[x, y, b]] == 0, Im[equation[x, y, b]] == 0}, {{x, 1.2}, {y, - 0.01}}]
As a beginner, this equation seems difficult to solve with mathematica, and the calculation time for a given b
is very long.
How can I control the code more efficiently in order to obtain the best roots for this problem?
Upvotes: 0
Views: 47