Problem with symbolic math integration of besselk times exponent
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lior Rubanenko
am 3 Okt. 2019
Beantwortet: Walter Roberson
am 3 Okt. 2019
According to Mathematica and the G&R book, the integral
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241027/image.png)
where K0 is the modified bessel function of the second kind, has a closed form solution that can be expressed using the Meijer G function or the hypergeometric function. However, Matlab's symbolic integrations outputs,
syms x
>> I = int(besselk(0,x/a) * exp(-x/a),x)
I =
x*exp(-x/a)*(besselk(0, x/a) - besselk(1, x/a))
which is obviously the wrong answer. Matlab itself confirms that, by the way, since,
diff(I,x)
ans =
exp(-x/a)*(besselk(0, x/a) - besselk(1, x/a)) + x*exp(-x/a)*(besselk(0, x/a)/a - besselk(1, x/a)/a + besselk(1, x/a)/x) - (x*exp(-x/a)*(besselk(0, x/a) - besselk(1, x/a)))/a
What am I doing wrong?
Thanks!
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 3 Okt. 2019
MATLAB is correct, that is one of the ways of expressing the integral.
convert(BesselK(v, z), MeijerG);
1 / [[1 1 ] ] 1 2\
- MeijerG|[[], []], [[- v, - - v], []], - z |
2 \ [[2 2 ] ] 4 /
What am I doing wrong?
You failed to simplify() the differentiation.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Mathematical Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!