my differential equation general solution form requires very high or low values, exceeding double precision capability, while I know its solution is finite
Show older comments
as a brief explanation, I'm trying to solve a first order bessel equation which is part of a more complicated PDE problem, whose solution is as following form:
now we have a bunch of these functions and not one, so there are for example 10 integral coefficients like c1(1), c1(2),... and c2(1),c2(2),....
now when I apply the boundary conditions, a set of linear equations are made by which I can calculate c1, c2,... . in the form "A*C=B".
now as x is near zero, I1(x) goes to zero and K1(x) goes to inf, and as x goes up, I1(x) goes to inf and K1(x) goes to zero. given that y(x) is finite and something less than 0.07, c1 and c2 go to inf or zero depending on their factor. and here the problem begins. working with very high and low values decrease accuracy and might lead to inf or zero.
any idea to overcome this issue?
10 Comments
J. Alex Lee
on 17 Aug 2020
if you can express any equations as ratios of bessel functions, maybe you can switch to approximate expressions at the low and high ends by taking the limits of the ratios of the taylor expansions about 0 and infinity.
David Goodmanson
on 17 Aug 2020
Hi hosein,
how are the boundary conditions determined? Is it a case of making y and x^n dy/dx (for a particular n) to be continuous across boundaries?
hosein Javan
on 18 Aug 2020
Edited: hosein Javan
on 18 Aug 2020
hosein Javan
on 18 Aug 2020
Edited: hosein Javan
on 18 Aug 2020
David Goodmanson
on 18 Aug 2020
hello sir,
I still have an inquiry about the derivative aspect. If you need, say, dI/dx and dK/dx, how are those being calculated?
hosein Javan
on 18 Aug 2020
J. Alex Lee
on 19 Aug 2020
I'm not suggesting "controlling" growth by multiplication with constants...I just off-handedly commented about ratios because, for example, ratios of
of n differing by 1 (for same argument v) seem to come up in a lot of fields and so is discussed a lot. Since all
explode for large ν, it's hard to get values of their ratios; matlab's built-in besseli seems to fail for
. If you only care about ratios, you can come up with their asymptotically good estimates as I mentioned above.
of n differing by 1 (for same argument v) seem to come up in a lot of fields and so is discussed a lot. Since all
explode for large ν, it's hard to get values of their ratios; matlab's built-in besseli seems to fail for
. If you only care about ratios, you can come up with their asymptotically good estimates as I mentioned above.Now in your case above you have
and
, but for large x,
, so maybe you can think about their product. WolframAlpha tells me that the series expansion of the product about
is
, so maybe you can think about their product. WolframAlpha tells me that the series expansion of the product about 
I'm not sure what the imaginary part is about...if you ignore it, here's the comparison you get between computing the product vs using the real part of above:
x = logspace(0,5,100)';
y = besseli(1,x).*besselk(1,x);
z = 1./2./x - 3./16./x./x - 45./256./x./x./x;
loglog(x,y,'-')
hold on;
loglog(x,z,'--')

Anyway, maybe this strategy is not at all useful for your case, I don't know.
David Goodmanson
on 19 Aug 2020
Edited: David Goodmanson
on 19 Aug 2020
Hello sir,
I don't have the impression you have written 'too much' and in fact I have a couple more questiions.
Could you mention what the physical situation is?
Something must distinguish the regions. It seems that each region has its own value of p determined in some fashion, is that correct?
For boundary conditions, is it as simple as for example
C4n I() + c5n K() = C6n I() + c7n K()
C4n dI()/dy + c5n dK()/dy = const* [ C6n dI()/dy + c7n dK()/dy ]
or
C4n d(yI())/dy + c5n d(yK())/dy = const* [ C6n d(yI())/dy + c7n d(yK())/dy ]
hosein Javan
on 19 Aug 2020
Edited: hosein Javan
on 19 Aug 2020
hosein Javan
on 19 Aug 2020
Edited: hosein Javan
on 19 Aug 2020
Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


