SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2

Amin
Posts: 2045
Joined: July 14th, 2002, 3:00 am

### Re: Analytic ODE solution possible for this one?

Yes, using my method you would have to take a time step that would correspond to number of terms of the series expansion included in the solution. You could, however, use a far larger step than most of the numerical methods. If you could recognize the series expansion of the solution, you can find the corresponding closed form solution.
What makes you think that the new method is not general?

tw
Topic Author
Posts: 885
Joined: May 10th, 2002, 3:30 pm

### Re: Analytic ODE solution possible for this one?

Amin wrote:
Yes, using my method you would have to take a time step that would correspond to number of terms of the series expansion included in the solution. You could, however, use a far larger step than most of the numerical methods. If you could recognize the series expansion of the solution, you can find the corresponding closed form solution.
What makes you think that the new method is not general?

Well I quickly read through it and their proposed ansatz solution seemed to work just fine. However the algebra look fairly hardcore, I was summoning up the energy to verify it, when I scanned to the bottom of the paper and they plotted the analytic solution versus a numerical integration and another
perturbation approach.
Just on one of the final oscillations before it decays away, the analytic solution deviates away and has a nonzero asymptotic solution.
I will read it a bit more carefully.I like the way if gives an explicit  form for the decay of the frequency of the oscillations through the "omega" functions which go as the argument of the Jacobi elliptic functions (which is very much of interest to me). Need to rework the whole thing for the care of a constant force acting on it.

Cuchulainn
Posts: 56926
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Analytic ODE solution possible for this one?

tw,
You obviously have your reasons for an explicit solution but you also mention asymptotic solutions. The Lyapunov method might be useful?

https://en.wikipedia.org/wiki/Lyapunov_stability

and it has an example for Dr. Pol's equation.

// BTW I see Jacobi is in Boost

http://www.boost.org/doc/libs/1_65_1/li ... bi_cd.html

ppauper
Posts: 68811
Joined: November 15th, 2001, 1:29 pm

### Re: Analytic ODE solution possible for this one?

I've got a pair of coupled ODEs. I can write down a general form for one in terms of a parameter $n=0,1,2,\cdots$
Can anyone square the circle for me and write a general form for the other?

$f_{n}''+2\zeta f_{n}'-2nf_{n}=0$
and
$g_{n}''-2\zeta g_{n}'-2(n+1)g_{n}=-4f_{n}'$
with $f_{n}(\zeta)=\frac{1}{n!(2i)^{n}}H_{n}(i\zeta)$
(Hermite polynomial) so $f_{n+1}'(\zeta)=f_{n}(\zeta)$.
what's $g_{n}(\zeta)$ ?

edit: latex fixed
I'm looking for a general polynomial solution
Last edited by ppauper on June 13th, 2018, 7:41 pm

Alan
Posts: 9536
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: Analytic ODE solution possible for this one?

ppauper wrote:
I've got a pair of coupled ODEs. I can write down a general form for one in terms of a parameter $n=0,1,2,\cdots$
Can anyone square the circle for me and write a general form for the other?

\$f_{n}''+2\zeta f_{n}'-2nf_{n}=0$
and
\$g_{n}''-2\zeta g_{n}'-2(n+1)g_{n}=-4f_{n}'$
\with $f_{n}(\zeta)=\frac{1}{n!(2i)^{n}}H_{n}(i\zeta)$
(Hermite polynomial) so $f_{n+1}'(\zeta)=f_{n}(\zeta)$.
what's $g_{n}(\zeta)$? A Green function solution might be what you are looking for:$ g_{n}(\zeta) = 4 \int G_{n}(\zeta,\zeta') f_{n}'(\zeta') \, d \zeta'$. The Green function is constructed in a standard way from homogeneous solutions to your second ODE. ppauper Posts: 68811 Joined: November 15th, 2001, 1:29 pm ### Re: Analytic ODE solution possible for this one? variation of parameters I tried it but it's not that helpful The two homogeneous solutions are$g_{a}=e^{\zeta^{2}}f$and$g_{b}=e^{\zeta^{2}}f\int\frac{e^{-\zeta^{2}}d\zeta}{f(\zeta)^{2}}$with Wronskian$W=g_{a}g_{b}'-g_{a}'g_{b}=e^{\zeta^{2}}$variation of parameters gives something like$g=\pi^{1/2}e^{\zeta^{2}}{\rm erf}(\zeta)f(\zeta) $and for the application I need polynomial solutions (which is what you get if you do it case by case as it were) Obviously the difference is in the second homogeneous solution and I need to evaluate$\int\frac{e^{-\zeta^{2}}d\zeta}{H(n,i\zeta)^{2}}$where$H(n,\zeta)$is a Hermite polynomial I have polynomial solutions for specific values of$n$but I'd like a master solution that covers all values of$n$Alan Posts: 9536 Joined: December 19th, 2001, 4:01 am Location: California Contact: ### Re: Analytic ODE solution possible for this one? Another suggestion is to post the problem that led to these ODE's. Maybe someone will see a more direct approach to that original problem. ppauper Posts: 68811 Joined: November 15th, 2001, 1:29 pm ### Re: Analytic ODE solution possible for this one? it's for a series solution of the Black-Scholes PDE. I've got a maple code for spitting out as many of the$g_{n}$as I care to, but it would be nice to have a general expression I've got the solution down to a double sum$g_{n}= -\sum_{m=0}^{n}\frac{1}{m!(n-m)!}x^{n-m}\times\left[x^{m-1} +\frac{(m-1)x^{m-3}}{2} +\frac{(m-1)(m-3)x^{m-5}}{2^{2}} +\frac{(m-1)(m-3)(m-5)x^{m-7}}{2^{3}} +\cdots\right]$the polynomial inside the square brackets terminates when the exponent becomes negative That polynomial$x^{m-1} +\frac{(m-1)x^{m-3}}{2} +\frac{(m-1)(m-3)x^{m-5}}{2^{2}} +\frac{(m-1)(m-3)(m-5)x^{m-7}}{2^{3}} +\cdots$looks so simple there's got to be a good chance it's a known function It can be written very compactly using th double factorial In terms of actual factorials (versus double factorials) it gets messier with separate expressions needed for even and odd powers It took a lot of work, Cauchy formula for repeated integration along with the integral form of the Hermite polynomials Alan Posts: 9536 Joined: December 19th, 2001, 4:01 am Location: California Contact: ### Re: Analytic ODE solution possible for this one? ppauper wrote: it's for a series solution of the Black-Scholes PDE. I've got a maple code for spitting out as many of the$g_{n}$as I care to, but it would be nice to have a general expression I've got the solution down to a double sum$g_{n}= -\sum_{m=0}^{n}\frac{1}{m!(n-m)!}x^{n-m}\times\left[x^{m-1} +\frac{(m-1)x^{m-3}}{2} +\frac{(m-1)(m-3)x^{m-5}}{2^{2}} +\frac{(m-1)(m-3)(m-5)x^{m-7}}{2^{3}} +\cdots\right]$the polynomial inside the square brackets terminates when the exponent becomes negative That polynomial$x^{m-1} +\frac{(m-1)x^{m-3}}{2} +\frac{(m-1)(m-3)x^{m-5}}{2^{2}} +\frac{(m-1)(m-3)(m-5)x^{m-7}}{2^{3}} +\cdots$looks so simple there's got to be a good chance it's a known function It can be written very compactly using th double factorial In terms of actual factorials (versus double factorials) it gets messier with separate expressions needed for even and odd powers It took a lot of work, Cauchy formula for repeated integration along with the integral form of the Hermite polynomials I don't understand when that polynomial inside the large brackets terminates. "when the exponent becomes negative" is confusing as there are various exponents. Please write out *all* the terms for$n = 0,1,2,3,4$. (Don't use any$\cdots$). That should clear it up. Once I understand it, I'll see if Mathematica can turn it into a known function. ppauper Posts: 68811 Joined: November 15th, 2001, 1:29 pm ### Re: Analytic ODE solution possible for this one? it's$h_{m}=\sum_{0\le k\le (m-1)/2}\frac{(m-1)!!x^{m-1-2k}}{(m-1-2k)!!}$with$k$an integer$0$for$m=01$for$m=1x$for$m=2x^{2}+1$for$m=3x^{3}+\frac{3x}{2}$for$m=4x^{4}+2x^{2}+2$for$m=5x^{5}+\frac{5x^{3}}{2}+\frac{15x}{4}$Alan Posts: 9536 Joined: December 19th, 2001, 4:01 am Location: California Contact: ### Re: Analytic ODE solution possible for this one? ppauper wrote: it's$h_{m}=\sum_{0\le k\le (m-1)/2}\frac{(m-1)!!x^{m-1-2k}}{(m-1-2k)!!}$with$k$an integer$0$for$m=01$for$m=1x$for$m=2x^{2}+1$for$m=3x^{3}+\frac{3x}{2}$for$m=4x^{4}+2x^{2}+2$for$m=5x^{5}+\frac{5x^{3}}{2}+\frac{15x}{4}$Success. So inserting the missing 2^k, and letting m = 2 J + 1, I defined H[J_] := Sum[(2 J)!! x^(2 J - 2 k)/(2^k (2 J - 2 k)!!), {k, 0, J}] Then, with FullSimplify[H[J]], Mathematica found$ H(J) = e^{x^2} \Gamma(1+J,x^2)$, using the incomplete Gamma function. I'll leave the case of even m to you. ppauper Posts: 68811 Joined: November 15th, 2001, 1:29 pm ### Re: Analytic ODE solution possible for this one? thanks it looks like the best I'm going to get is Kummer hypergeometric functions If I go back to the original equation and turn it into a 4th order equation, I find a general solution$\left[c_{1}+c_{2}{\rm erf}(x)\right]M\left(\frac{n}{2}+\frac{1}{2},\frac{1}{2}.x^{2}\right) +\left[c_{3}+c_{4}{\rm erf}(x)\right]M\left(\frac{n}{2}+1,\frac{3}{2}.x^{2}\right)$some of the coefficients vanish: 2 vanish when$n$is odd and (a different) 2 vanish when$n$is even The bad news is that while there are nice expressions for$M\left(m+\frac{1}{2},\frac{1}{2}.x^{2}\right)$and$M\left(m+\frac{1}{2},\frac{3}{2}.x^{2}\right)$, the expressions for$M\left(m,\frac{1}{2}.x^{2}\right)$and$M\left(m,\frac{3}{2}.x^{2}\right)[$] all seem to be lengthy and unpleasant and worse than what I had already

On a side note, a rant at maple.
I grew up using Kummer functions as my degenerate hypergeometric functions, and early versions of maple used them.
Then for no apparent reason, maple switched to Whittaker functions, including the (old old) version of maple on my laptop.
It's annoying as whenever maple spits them out as a solution to something, I have to grab Abramowitz & Stegun and convert them back to the Kummer functions that we all know and love. Maple should switch back to Kummer functions if they haven't already

j^2)+(_C2+_C4*erf(xmj))*KummerM(1+1/2*n,3/2,xmj^2)*xmj;