An approximate solution to a differential equation $f'(x)^2 - \omega^2 f(x)^2 = G(x)$ for small $x$

480 Views Asked by At

Suppose I have an ODE of the form $$ \left( \frac{df}{dx} \right)^{2} - \omega^2 f(x)^2 = G(x) $$ with $\omega>0$ and the initial condition $f(0)=0$ and where $G(x)$ is a very complicated function (which you might not even have an analytic expression for). I seek the solution for $x>0$.

Even though I don't have the full expression for $G(x)$, I do know the series expansion for $G(x)$ for $0< x \ll 1$ where I have $$ G(x) \simeq \omega^2 - \alpha x^4 + \mathcal{O}(x^6) $$ for some number $\alpha >0$.

If I am interested in the solution for small $x$, then I have approximately $$ \left( \frac{df}{dx} \right)^2 - \omega^2 f(x)^2 \simeq \omega^2 $$ under the condition that $\alpha x^4 \ll 1$. There is a simple solution to the above DE: does it make sense to say the following? $$ f(x) \simeq \sinh(\omega x) \ \ \ \ \ \ \mathrm{when\ }\alpha x^4 \ll 1 $$ The above seems to work numerically quite well, but I am confused because I am taking a series expansion in the ODE and dropping terms $\mathcal{O}(x^4)$ there in the DE: however, my approximate solution has terms higher order than this in it. So in this sense my solution is not really a series in $x\ll 1$.

Does it make sense what I've done? Maybe the condition $\alpha x^4 \ll 1$ doesn't make sense here? Is there any literature on approximating DE's in this manner?

An Example With a Plot I have cooked up a function (involving Bessel functions) $$ G_0(x) := \omega^2 J_0\left(\left[ \frac{192\alpha}{\omega^2} \right]^{1/4} x\right) + 2 \omega^2 J_{2}\left(\left[ \frac{192\alpha}{\omega^2} \right]^{1/4} x\right) $$ This has the $x\ll 1$ expansion $G_0(x) \simeq \omega^2 - \alpha x^4 + \mathcal{O}(x^6)$ (I've cooked up the parameters in the arguments so this is so). The smaller you make $\alpha$, for larger values of $x$ the function looks approximately constant $G_0(x) \sim \omega^2$.

Below I do some numerical plotting for $\omega = 0.4$ and $\alpha=0.001$. In the first curve I numerically solve for the exact curve $f(x)$ for the choice $G_0$. The second curve I plot the approximation $\sinh(\omega x)$. In the last curve I use the first three terms of the series expansion of $\sinh(\omega x) \sim \omega x + \ldots$ enter image description here The Point: $\sinh(\omega x)$ is a much better approximation for the solution $f$ (than the simple series expansion $\omega x + \ldots$). This is because $\alpha$ is chosen to be small here.

Why can you neglect terms $\mathcal{O}(x^4)$ in the ODE (presumably this would mean your solution needs to be a series in $x$ too?), and yet the better approximation is a function $\sinh(\omega x)$ which has every order (higher than 4!) contributions?

How to understand the error in $\sinh(\omega x)$ when using such an approximation? (an error which seems to be smaller than the error introduced by a simple series solution to $f$.)

5

There are 5 best solutions below

2
On BEST ANSWER

When deriving approximate solutions to differential equations, one should always build the approximation around the base solution in a proper form to ensure accuracy.

So, start with the equation in question,

$$ [f’(x)]^{2} - \omega^2 f(x)^2 = \omega^2-\alpha x^4\tag{1} $$

Since $\sinh(\omega x) $ is the exact solution to the base DE,

$$ [f’(x)]^{2} - \omega^2 f(x)^2 = \omega^2\tag{2} $$

the approximation should be constructed around $\sinh(\omega x)$ in the following product form,

$$f(x) = \sinh(\omega x)(1 +c x^4)$$

where $c$ is the approximation coefficient to be solved and it is of the order $O(\alpha)$. Then,

$$ f’(x) = \omega \cosh(\omega x) (1+cx^4)+\sinh(\omega x) \cdot 4cx^3$$

$$= \omega \cosh(\omega x) + 5c\omega x^4 + O(c^2)$$

and,

$$[f’(x)]^2= \omega^2\cosh^2(\omega x) + 10c\omega^2 x^4 + O(c^2)\tag{3}$$

Plug (3) into (1). The terms corresponding to the base DE cancels out as constructed and the following approximation coefficient can be obtained,

$$c=-\frac{\alpha}{10\omega^2}$$

Therefore, the approximation taking into account of the added term $-\alpha x^4$ in (1) is

$$f(x) = \sinh(\omega x)\left(1-\frac{\alpha}{10\omega^2}x^4\right)\tag{3}$$

The solution above should then be compared with the exact curve in your plots to judge the quality of the approximation.

Notes:

One should not expand the base solution $\sinh(\omega x)$ since it is the exact solution to the base DE. The base solution contains the essential information embedded in the base DE (2), up to all orders of $x$.

The reason that $\sinh(\omega x)$ is better than its polynomial expansion is simply because it is the exact base solution. Expanding it to just a few terms would compromise the quality of the solution, as shown by the third curve in your plots. So, it should not be surprising that $\sinh(\omega x)$ is closer to the real curve than its polynomial cutoff. (The simple expansion is only valid for small values of $x$, evident from the third curve in your plots.)

As alluded earlier, It is better to choose the product form in (3) for the approximate solution since the added term of order $x^4$ is comparable to that in (1). Furthermore, a more accurate approximation can be derived by including a higher order term as below

$$f(x) = \sinh(\omega x)\left(1-\frac{\alpha}{10\omega^2}x^4 +\frac{4\alpha}{105} x^6\right)$$

1
On

I'm confused with your question. A useful way to think about your approximation is to just pretend that terms which are $\sim x^4$ and higher are just zero. So your solution behaves like $\sinh(x)$ in a particular regime (namely, when the higher order terms can be neglected). Its obvious from the graph you present that, for sufficiently small $x$, the higher order terms aren't significant enough to make a meaningful difference between your 3 solutions.

As an example, consider the linear approximation of both $\sin(x)$ and $\tan(x)$, so we're dropping any term which is $\mathcal{O}(x^2)$. Indeed, in this regime: $$\sin(x) \approx \tan(x) \approx x,$$ since the higher order terms (which constitute the difference between the 3 functions) are too small to differentiate between these very different functions. For small enough $x$, we can interchange $\sin(x)$ and $\tan(x)$ without much loss in accuracy, but this becomes nonsensical when $x$ is finite.

0
On

A few different comments -

  1. To obtain the green polynomial approximation, you have to make two approximation steps : first you approximate the ODE, then you approximate that solution. So its reasonable that it should be a worse approximation.

  2. The approximation may not be as good as our eyes tell us, because the correct distance between the curves is not the distance as sets (infimum of distance between points in graphs), but the distance between points on the same vertical line. As the function gets steeper, this is harder to see. Try a log plot?

  3. further to 1, truncating at the level of the ODE makes the dynamics approximately valid, but truncating to a polynomial changes this further. You now have $$ (f')^2 - w^2 f^2 = -\frac{w^{12} x^{10}}{14400} + \frac{w^{10} x^{8}} {576} + \frac{w^8 x^6}{40} - \frac{w^7 x^{11}}{360} + \frac{w^6 x^4}3 - \frac{w^3 x^7}3 - \frac{w^2 x^{12}}{36} + w^2 $$
0
On

HINT

Is known that

$$(\sinh x)' =\cosh x,$$ $$(\tanh x)' = \dfrac 1{\cosh^2x} = 1 - \tanh^2x.$$

Let $$\color{brown}{\mathbf{f(x) = \sinh(\omega g(x)),\quad g(0)=0}},$$ then $$(g'^2(x)-1)\cosh^2(\omega g(x)) = -\dfrac{\alpha x^4}{\omega^2},$$ $$g'^2(x) = 1-\dfrac{\alpha x^4}{\omega^2}(1-\tanh^2(\omega g(x))),$$ $$g'(x) = \pm\sqrt{1-\dfrac{\alpha x^4}{\omega^2}(1-\tanh^2(\omega g(x)))},$$ $$g'(x) = \pm\left(1-\dfrac{\alpha x^4}{2\omega^2}(1-\tanh^2(\omega g(x))) \right)+O(x^8),$$ $$g(x)\approx \pm\left(x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha}{10\omega^2}\int\limits_0^x\tanh^2(\omega g(x))\mathrm dx^5\right)$$ $$= \pm\left(x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha x^5}{10\omega^2}\tanh^2(\omega g(x))\right)$$ $$-\dfrac{\alpha}{5\omega}\int\limits_0^x x^5\tanh(\omega g(x))(1-\tanh^2(\omega g(x)))g'(x)\mathrm dx$$ $$\approx \pm\left(x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha x^5}{10}g^2(x)\right)-\dfrac{\alpha}{30}\int\limits_0^x g(x)\mathrm dx^6$$ $$= \pm\left(x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha x^5}{10}g^2(x)\right)-\dfrac{\alpha x^6}{30}g(x)+\dfrac{\alpha}{30}\int\limits_0^x x^6 g'(x)\mathrm dx$$ $$\approx \pm\left(x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha x^5}{10}g^2(x)\right)-\dfrac{\alpha x^6}{30}g(x)\pm\dfrac{\alpha x^7}{210},$$ with the square equation for $g(x)$in the form of $$\color{brown}{\mathbf{\dfrac{\alpha x^5}{10}g^2(x) \mp \left(1+\dfrac{\alpha x^6}{30}\right)g(x)+x-\dfrac{\alpha x^5}{10\omega^2}+\dfrac{\alpha x^7}{210} = 0.}}$$

0
On

$\color{brown}{\textbf{ODEs with the exact solutions.}}$

Assume the given equation in the form of $$y'^2-\omega^2y^2 = \omega^2G_{2N}(x),\tag{1.1}$$

where $$G_{2N}(x) = G_0+G_2x^2+G_4x^4+\dots+G_{2N}.\tag{1.2}$$

Let us define the family of functions $f_{n,m}\left(\vec v,z\right),$ such as

$f_{n,0}\left(\vec v, z\right) = \sum\limits_{j=1}^n v_j\sinh(jz),\quad f_{n,m}\left(\vec v, z\right) = f^{(m)}_{n0}\left(\vec v, z\right),\quad \vec v = \{p,q,r,...\},\tag{1.3}$

then

$f_{n,2k}\left(\vec v, z\right)=\sum\limits_{j=1}^{n}j^{2k}v_j\sinh(jz),\quad f_{n,2k+1}\left(\vec v, z\right)=\sum\limits_{j=1}^{n}j^{2k+1}v_j\cosh(jz).\tag{1.4}$

At the same time, every function $f_{n,0}\left(\vec v, \omega x\right)$ is the solution of the equation

$y'^2-\omega^2y^2=\omega^2\left(f^2_{n,1}\left(\vec v, \omega x\right)-f^2_{n,0}\left(\vec v, \omega z\right)\right)\tag{1.5}$ under the condition $$y(0) = 0.\tag{1.6}$$

In particular, function $y = f_{1,0}\left(\vec v, \omega x\right)= p\sinh\omega x$ is the solution of the equation $$y'^2-\omega^2y^2 = \omega^2g_1(\omega x)$$ under the condition $(5),$ where $$g_1(z)=f^2_{1,1}\left(\vec v, z\right)-f^2_{1,0}\left(\vec v, z\right)=p^2(\cosh^2(z)-\sinh^2(z)) = p^2.$$

Similarly, function $y = f_{2,0}\left(\vec v, \omega x\right)= p\sinh\omega x + q\sinh2\omega x$ is the solution of the equation $$y'^2-\omega^2y^2 = \omega^2 g_2(\omega x)$$ under the condition $(1.5),$ where

$g_2(z)=f^2_{2,1}\left(\vec v, z\right)-f^2_{2,0}\left(\vec v, z\right) =(p\cosh\omega x+2q\cosh2\omega x)^2 -(p\sinh\omega x+q\sinh2\omega x)^2,$

etc.

Since all the functions $g_n(z)$ are even, this approach forms the infinity spectrum of the exact parametric solutions, which allow to approximate the solutions for the arbitrary even RHS $G(x)$ via the hyperbolic series.

$\color{brown}{\textbf{Approximate solutions for the polynomial RHS.}}$

Denote

$$\{A_n,B_n,C_n,\dots\} = F_{n,2k+1}=f_{n,2k+1}\left(\vec v,0\right)= \sum\limits_{j=1}^{n}j^{2k+1} v_j,\quad k=0,1,2,\dots\tag{2.1}$$

Approximate solutions can be built via the Maclaurin series of the function $$g_n(z) = f^2_{n1}\left(\vec v, z\right)-f^2_{n0}\left(\vec v, z\right).$$

Since $g_{n}$ is the even function, it suffices to calculate only the even derivatives of $g_n(z):$

\begin{aligned} &g_n^{{2k}}(z) = \left(f_{n,1}\left(\vec v, z\right)f_{n,1}\left(\vec v, z\right)\right)^{(2k)} -\left(f_{n,0}\left(\vec v, z\right)f_{n,0}\left(\vec v, z\right)\right)^{(2k)}\\[4pt] &=\sum\limits_{j=0}^{2k}\binom{2k}{j}f_{n,1}^{(j)}\left(\vec v, z\right)f^{(2k-j)}_{n,1}\left(\vec v, z\right) - \sum\limits_{j=0}^{2k}\binom{2k}{j} f^{(j)}_{n,0}\left(\vec v, z\right)f^{(2k-j)}_{n,0}\left(\vec v, z\right)\\ &=\sum\limits_{j=0}^{2k}\binom{2k}{j}f_{n,j+1}\left(\vec v, z\right)f_{n,2k-j+1} \left(\vec v, z\right) - \sum\limits_{j=0}^{2k}\binom{2k}{j} f_{n,j}\left(\vec v, z\right)f_{n,2k-j}\left(\vec v, z\right)\\ &=\binom{2k}{k}f^2_{n,k+1}\left(\vec v, z\right)+2\sum\limits_{j=0}^{k-1}\binom{2k}{j} f_{n,j+1}\left(\vec v, z\right)F_{n,2k-j+1}\left(\vec v, z\right)\\ &- \binom{2k}{k}f^2_{n,k}\left(\vec v, z\right) - 2\sum\limits_{j=0}^{k-1}\binom{2k}{j} f_{n,j}\left(\vec v, z\right)f_{n,2k-j}\left(\vec v, z\right), \end{aligned}

or, taking in account $(1.2).$ $\begin{cases} g_{n}^{(4l)}(0) = \dbinom{4l}{2l}F^2_{n,2l+1} + 2\sum\limits_{j=0}^{l-1}F_{n,2j+1} \left(\dbinom{4l}{2j}F_{n,4l-2j+1}-\dbinom{4l}{2j+1}F_{n,4l-2j-1}\right)\\ g_{n}^{(4l+2)}(0) = 2\sum\limits_{j=0}^{l}\dbinom{4l+2}{2j} F_{n,2j+1}F_{n,4l-2j+3} - 2\sum\limits_{j=0}^{l-1}\dbinom{4l+2}{2j+1} F_{n,2j+1}F_{n,4l-2j+1} - \dbinom{4l+2}{2l+1}F^2_{n,2l+1}. \end{cases}\tag{2.2}$

In particular, $\begin{cases} g_n(0) = A_n^2,\\ g''_n(0) = 2A_nB_n-2A_n^2,\\ g^{IV}_n(0) = 6B_n^2+2A_n(C_n-4B_n),\\ g^{VI}_n(0) = 2A_n(D_n-6C_n)+30B_nC_n-20B_n^2,\\ g^{VIII}_n(0) = 70C_n^2 +2A_n(E_n-8D_n)+2B_n(28D_n-56C_n)\dots \end{cases}\tag{2.3}$

If $\color{brown}{\mathbf{n=2}},$ then

$A_2=p+2q,\quad B_2 = p+8q.\quad C_2 = p+32q,$

$g_2(0)= A_2^2 = (p+2q)^2,$

$g''_2(0)=2A_2(B_2-A_2) = 12q(p+2q),$

$g^{IV}_2(0)=6B_2^2 + 2A(C-4B) = 12q(7p+32q),$

and one can get Maclaurin series for $g_2(\omega x)$ in the form of $$g_2(\omega x) = (p+2q)^2+6q(p+2q)\omega^2x^2+\dfrac{q(7p+32q)}2\omega^4x^4+\dots\tag{2.3}$$

Using $(2.3),$ easily to show that the function $$y_2=(a-2b)\sinh\omega x+2b\sinh2\omega x\tag{2.4}$$

provides the approximate solution of the equation $$y'^2-\omega^2y^2 = \omega^2(a^2+6ab\omega^2x^2)\tag{2.5}$$ under the condition $(1.5),$ if $a>0.$

The Wolfram Alpha plot for $a=1, b=5,\omega = 0.4$

A=1,B=5, omega = 0.4

confirms the obtained results.

At the same time, series $(2.2)$ does not correspond with the given function $G(x).$

$\color{brown}{\textbf{Approximate solution for $\mathbf{n=3}$.}}$

Taking in account $G(x)=\omega^2-\alpha x^4,$ assume $$g_3(x)\approx 1-\dfrac{\alpha}{\omega^2} = 1 - 10\beta w^4x^4,\tag{3.1}$$ where $$\alpha = 0.001,\quad \omega = 0.4,\quad \beta =\dfrac\alpha{10\omega^6}=\dfrac{25}{1024}.\tag{3.2}$$

Let \begin{cases} A_3=p+2q+3r\\ B_3=p+8q+27r\\ C_3=p+32q+243r.\tag{3.3} \end{cases}

Taking in account $(2.3),(3.1),(3.2),$ one can get \begin{cases} A_3^2=1\\ 2A_3B_3 - 2A_3^2 = 0\\ 6B_3^2 +2A_3(C_3-4B_3) = -240\beta,\\ \end{cases} $$B_3=A_3=1,\quad C_3 = 1-120\beta.$$

Then from $(3.3)$ should $$ \begin{cases} p+2q+3r=1\\ p+8q+27r=1\\ p+32q+243r=1-120\beta, \end{cases}\Rightarrow \begin{cases} p+2q+3r=1\\ 6q+24r=0\\ 24q+216r=-120\beta, \end{cases}\Rightarrow \begin{cases} p+2q+3r=1\\ 6q+24r=0\\ 120r=-120\beta, \end{cases} $$ $$r=-\beta = -\dfrac{25}{1024},\quad q=4\beta = \dfrac{25}{256},\quad p=1-5\beta = \dfrac{899}{1024}$$

This leads to the approximate solution of $(1.1)$ under the condition $(1.6)$ in the form of $$f_3(x)\approx(1-5\beta)\sinh\omega x+4\beta\sinh2\omega x - \beta\sinh3\omega x,\tag{3.4}$$ or $$f_3(x)\approx \dfrac{899\sinh\omega x+100\sinh2\omega x - 25\sinh3\omega x}{1024}.\tag{3.5}$$

$\color{brown}{\textbf{Approximate solution for $\mathbf{n=4}$.}}$

Taking in account $(3.1)-(3.2),$ let \begin{cases} A_4=p+2q+3r+4s\\ B_4=p+8q+27r+64s\\ C_4=p+32q+243r+1024s\\ D_4=p+128q++2187r+16384s.\tag{4.1} \end{cases}

Taking in account $(2.3),(3.1),(3.2),$ one can get

$$\begin{cases} A_4^2=1\\ 2A_4B_4 - 2A_4^2 = 0\\ 6B_4^2 +2A_4(C_4-4B_4) = -240\beta,\\ 2A_4(D_4-6C_4)+30B_4C_4-20B_4^2 = 0,\\ \end{cases}\Rightarrow \begin{cases} B_4=A_4=1\\ 2A_4B_4 - 2A_4^2 = 0\\ 2C_4 = 2-240\beta,\\ 2D_4 = 20-18C_4,\\ \end{cases} $$ $$B_4=A_4=1,\quad C_4 = 1-120\beta,\quad D_4 = 2+2160\beta.$$

Then from $(3.3)$ should $ \begin{cases} p+2q+3r+4s=1\\ p+8q+27r+64s=1\\ p+32q+243r+1024s=1-120\beta\\ p+128q++2187r+16384s = 2+2160\beta \end{cases}\Rightarrow \begin{cases} p+2q+3r+4s=1\\ 6q+24r+60s=0\\ 24q+216r+960s=-120\beta\\ 96q+1944r+15360s = -2+2280\beta \end{cases}\Rightarrow \begin{cases} p+2q+3r+4s=1\\ q+4r+10s=0\\ 120r+720s = -120\beta\\ 1080r+11520s=-2+2760\beta \end{cases}\Rightarrow \begin{cases} p+2q+3r+4s=1\\ q+4r+10s=0\\ r+6s = -\beta\\ 5040s=-2+3840\beta, \end{cases} $ \begin{cases} s=-\dfrac1{2520}+\dfrac{16}{21}\beta = \dfrac{367}{20160},\\ r= \dfrac1{420}-\dfrac{39}7\beta = -\dfrac{14369}{107520},\\ q= -\dfrac1{180}+\dfrac{44}3\beta = \dfrac{4061}{11520},\\ p= \dfrac{181}{180}-\dfrac{47}{3}\beta = \dfrac{28711}{46080}.\tag{4.2} \end{cases}

This leads to the approximate solution of $(1.1)$ under the condition $(1.6)$ in the form of $$\begin{aligned} &f_4(x)\approx\dfrac{181-2820\beta}{180}\sinh\omega x+\dfrac{2640\beta-1}{180}\sinh2\omega x+\dfrac{1-2340\beta}{420}\sinh3\omega x\\ & + \dfrac{1920\beta-1}{2520}\sinh4\omega x, \end{aligned}\tag{4.3}$$ or $$f_4(x)\approx \dfrac{200977\sinh\omega x+113708\sinh2\omega x - 43107\sinh3\omega x +5872\sinh4\omega x}{322560}.\tag{4.4}$$

$\color{brown}{\textbf{The models comparison.}}$

Approximation polynomial $f_3(x)$ provides good correspondence of obtained RHS $g_3(x)$ with the given function $G(x),$ if $x<2.$

RHS,n=3

Function $f_4(x)$ gives similar approximation for $x<2.$

RHS,n=4

Since the model order can be choosen with attention to the polynomial $G(x),$ used approach looks suitable.