Mathematica Bessel function derivative in sum

Click For Summary
The discussion centers on the implementation of the first derivative of the modified Bessel function of the first kind in a summation. The user initially attempts to define the derivative function, DBesselI, using a delayed definition, which leads to errors when evaluating it. The main issue arises from using the delayed definition operator (:=) instead of the immediate definition operator (=). This mistake causes the function to interpret the variable incorrectly, resulting in an error message stating "2 is not a valid variable." The correct approach is to use an immediate definition for DBesselI, allowing the function to evaluate properly when called with specific arguments. The conversation highlights the importance of understanding the difference between immediate and delayed definitions in programming, particularly in mathematical contexts.
member 428835
Hi PF!

I'm trying to put the first derivative of the modified Bessel function of the first kind evaluated at some point say ##\alpha## in a sum where the ##ith## function is part of the index. What I have so far is
Code:
n=3;
alpha = 2;
DBesselI[L_, x_] := D[BesselI[L, x], {x, 1}]
Sum[BesselI[L, alpha], {L, 1, n}]
But I don't think this is working. Any help would be awesome!
 
Physics news on Phys.org
You are using the modified Bessel function, not its derivative that you defined in the previous line, in the sum ...
 
Ahh shoot,
Orodruin said:
You are using the modified Bessel function, not its derivative that you defined in the previous line, in the sum ...
Shoot, this is a typo on my part copying into PF. Instead if I use
Code:
n=3;
alpha = 2;
DBesselI[L_, x_] := D[BesselI[L, x], {x, 1}]
Sum[DBesselI[L, alpha], {L, 1, n}]
I still get an error. In fact, even if I simply try evaluating
Code:
DBesselI[1, alpha]
I receive an error. Any ideas?
 
It might help if you quote the error message.
 
Orodruin said:
It might help if you quote the error message.
It reads "2 is not a valid variable." and then iterates "##\partial_{\{2,1\}}BesselI[1,3]##". Any ideas?
 
Last edited:
  • Like
Likes member 428835
Thanks so much! This actually makes a lot of sense!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
8
Views
2K