LIBS = -L/usr/lib -lm
API = g_plot.o general.o
-OBJS = newton zentral homogen integral-1_2 integral-2_2 polynom_interpolation kettenbruchentwicklung bessel_1
+OBJS = newton zentral homogen integral-1_2 integral-2_2 polynom_interpolation kettenbruchentwicklung bessel_1 bessel_2
all: $(OBJS)
bessel_1: $(API)
$(CC) $(CFLAGS) -o $@ $(API) $(LIBS) bessel_1.c
+bessel_2: $(API)
+ $(CC) $(CFLAGS) -o $@ $(API) $(LIBS) bessel_2.c
+
clean:
rm $(API) $(OBJS)
--- /dev/null
+#include <stdio.h>
+#include <math.h>
+#include "general.h"
+#include "g_plot.h"
+
+#define L_PLUS 50
+#define MAX_R 10
+#define STEP_R .5
+#define MAX_L 50
+
+int main(int argc,char **argv) {
+ int i;
+ double F[MAX_L];
+ double J[MAX_L];
+ double p;
+ double r;
+
+ for(r=0;r<MAX_R;r+=STEP_R) {
+ i=MAX_L-2;
+ J[0]=(r==0)?1:sin(r)/r;
+ F[MAX_L-1]=0;
+ F[MAX_L-2]=1;
+
+ while(i) {
+ F[i-1]=(2*i+1)/(r*r)*F[i]-F[i+1];
+ i--;
+ }
+
+ p=J[0]/F[0];
+
+ for(i=1;i<MAX_L;i++) J[i]=p*F[i];
+
+ printf("%f %f %f ...\n",r,J[0],J[1]);
+
+ }
+
+ return 1;
+}
+
+