Recursive issue
- To: mathgroup at smc.vnet.net
- Subject: [mg65404] Recursive issue
- From: Clifford Martin <camartin at snet.net>
- Date: Thu, 30 Mar 2006 05:30:02 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Group, Recently I've been working on diffraction propagation problems inside passive laser cavities. The standard approach was pioneered by Fox and Li (Bell Systems Journal 1961) which is a numerical Fresnel propagator that the solution is fed back into the kernel for each pass. Numerically (which is how Fox and Li did it), the Mathematica solution is: The solution is for a one dimensional infinite strip mirror in 1 D. The inital parameters and the kernel are given by: l = 0.6328 w = 2*25*l z = 100*l Kmat = Table[(l/5)*(Exp[I*(((2*Pi)/l)*z)]/ Sqrt[I*l*z])*Exp[((-I)*((2*Pi)/l)*(x - y)^2)/ (2*z)], {x, -400*(l/5), 400*(l/5), l/5}, {y, -400*(l/5), 400*(l/5), l/5}]; Do[f[n] =. , {n, 0, 20}] ( * This sets the recursive terms to zero to start another run *) f[0] = Table[If[Abs[x] < 25*l, 1, 0], {x, -400*(l/5), 400*(l/5), l/5}]; (* This defines the initial intensity we set it to 1 *) f[n_] := f[n] = Kmat . (f[n - 1]*f[0]); (* This is the recursive equation where we use f[0] to normalize the recurring propagation at each mirror *) (* The next bit is various cases from f[1] to f[200] which show that the solution conveges to a ?normal? mode solution after enough passes *) ListPlot[Abs[f[0]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[1]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[2]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[5]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[10]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[20]], PlotRange -> All, PlotJoined -> True]; ListPlot[Abs[f[200]], PlotRange->All, PlotJoined->True]; This works well and as expected. Now for the problem (Sorry for the long set up!) This is Mathematica, I thought, so I can write the integral propator explicity without worrying about numerics . So using the same values of lamda, w and z, I write the initial intensity and the iterative kernel as an integral equation and recursively: f[0, x_] = 1 f[n_, x_] := (Exp[I*(((2*Pi)/l)*z)]/Sqrt[I*l*z])* Integrate[Exp[((-I)*((2*Pi)/l)*(q - x)^2)/(2*z)]* f[n - 1, q], {q, -w/2, w/2}] If you look at the first pass the solution is correct exactly matching the numerical solution but subsequent passes give the same solution as in pass 1 multiplied by a constant. In other words, the recursion is not working to feed the solution back into the kernel for the next step. When you look at the solution explicity (algebraicly ) for the first step it?s a bunch of Erf functions with some constants. When you look at the second pass it?s the same set of Erf functions multiplied by a larger constant. It looks like the recursion is working outside in somehow. Is there something I?m doing wrong in the explicit integral equation vs. the numerical one? Or is there a better way to do the explicit recursive integral equation? It?s not that I can?t solve this other ways. I?ve built a Fourier propagator and of course the numerical Fox-Li solution. What I?m trying to understand is what is going wrong with the explicit algebraic recursive solution. If any more detail is needed I can write anyone off line and provide more details. Regards, Cliff