Deriving solution of a second order ode from a closely related one with a different scalar coefficient for the term in X(x)

26 Views Asked by At

I solved the wrong differential equation!

I was looking at a parabolic pde in the style of a heat equations which upon separation of variables I wrote as \begin{equation} a x^2\left(\frac{d^2 X}{d x^2} + \frac{d X}{d x}\right) - b \left( \frac{d X}{d x} +X\right) -k =0 \quad\quad\quad{(*)} \end{equation} but this would be wrong as I should have written \begin{equation} a x^2\left(\frac{d^2 X}{d x^2} + \frac{d X}{d x}\right) - b \left( \frac{d X}{d x} +X\right) -\tilde{k} X =0.\quad\quad\quad(\dagger) \end{equation} The solution of ($*$) was attractive so I share it below. Introduce $R = \frac{dX}{dx} + X$ so that \begin{equation} ax^2 \frac{dR}{dx} -b R -k = 0 \end{equation} whose solution for $R$ is \begin{equation} \int \frac{dR}{k +b R} = \frac{\log( k + b R)}{r} = \int \frac{ dx}{a x^2} = - \frac{1}{a x} + c_1 \end{equation} with $\phi_1 = e^{c_1}$ representing the constant of integration to give \begin{equation} R= ( \frac{d X}{d x} + X) =\frac{\phi_1}{b} \exp\left(- \frac{b}{ax}\right) -\frac{k}{b}. \end{equation} We can employ an integration factor of $e^{x}$ gives \begin{eqnarray} \int d ( e^{x} X) &=& \int \left(\frac{\phi_1}{b} e^{x} \exp\left(- \frac{b}{a x}\right) -\frac{k}{b} e^{x} \right) dx + c_0 \\ X(x) &=& e^{-x} \int \left ( \frac{\phi_1}{b} e^{x} \exp\left(- \frac{b}{a x}\right) -\frac{k}{b} e^{x} \right)\; dx + c_0 \\ &=& \frac{\phi_1}{b} e^{-x} \int \exp\left(x - \frac{b}{a x}\right)\; dx\; - \frac{k}{b} + c_0 \end{eqnarray} The integral has the form $\int \exp(x -a/x) \;dx$. Expressing $\exp(x) $ as a series, taking its product with $\exp(-a/(bx))$ and integrating termwise gives \begin{equation} \int \exp \left(x -\frac{a}{bx}\right) \; dx \quad = \quad \frac{a}{b}\, \text{Ei}\left(-\frac{a}{bx}\right) \underset{n=0}{\overset{\infty }{\sum }}\frac{(-a/b)^n}{n! (n+1)!}\;+\;x\,\exp\left(-\frac{a}{bx}\right) \underset{m=0}{\overset{\infty }{\sum }}\left(\frac{\underset{n=0}{\overset{m}{\sum }}(-a/b)^{m-n} \, x^n\, n!}{m! (m+1)!}\right) \end{equation} where $\text{Ei}(\cdot)$ is the Exponential Integral function \begin{equation} \text{Ei}(z) \equiv -\int_{-z}^{\infty } \frac{e^{-u}}{u} \; du \equiv \int_{-\infty}^{z } \frac{e^{u}}{u} \; du. \end{equation} so all we need to solve the 'wrong' ode (*) is in place.

My question is with a solution to the 'wrong' ode (*) is it possible to obtain a solution to the 'right' one ($\dagger$)? Is this a use case for perturbation, or is there another approach I can take to solve ($\dagger$)?