double func_Schrodinger(double E, int match, double V[], double r[], double dr[], int N)Return value:
- Value of Psi returned by schint() at end of integration interval
Input:
- E: energy variable in Schrödinger equation used in schint().
- match: dummy variable (needed for Problem 4)
- V[]: potential energy on the grid
- r[], dr[], N: standard grid information
Design a routine func_Schrodinger() with the above prototype which
calls upon schint() to integrate Schrödinger's equation from
k1=0 to k2=N using Psi=0 and Psip=1 as initial conditions, and then
returns the final value of Psi. This routine is most appropriate for
the file ``physics.c''. (Don't forget to put the prototype in
``physics.h''!)
Hint: You will have to define an internal variable array
Psiout[] to send into schint(). You should accomplish this
dynamically in func_Schrodinger() just as you did for T[] in
schint().