PS for Reading Week
- Write a programme that asks for a number n and then calculates the Bessel function using some number of terms of the expansion:
J_n(x)=(x/2)^n sum_k=0^infty (-x^2/4)^k / k!(k+n)!
It should be easy to change the number of terms and there should be a function used for the individual terms of the expansion and for the factorial. Output the results for a range of x values and graph the result using gnuplot.
- One challenge here is that a naive calculation of the factorial quickly overwhelms the capacity of int: Factorial.cpp; the numerator and the deminator can't be calculated seperately, see Bessel.cpp.
- Write a programme that inverts a 2X2 matrix; check it is invertible first.