I wish to solve the following differential equations:$$g'(z) + \left[ -\frac{2}{1-z} + \frac{b}{(1-z)^2}\right]g(z) = 0$$ A similar one is $$g'(z) + \left[ -\frac{2}{1-z} + \frac{b}{(1-z)^2}\right]g(z) = -\frac{1}{(1-z)^2}$$ I am skeptical of the solutions given by WolframAlpha because in this answer equation *1 is correct, I believe, but it differs from the answer one get with WolframAlpha. Is WolframAlpha wrong or can this be reconciled?
1 Answers
These are both first order, linear, ODEs of the forms $$g'(z) + p(z) g(z) = 0 \text{ and } g'(z) + p(z) g(z) = q(z).$$ Both equations can be solve the the method of integrating factors.
Define $\mu(z) = \exp( \int_0^z p(t) ~\mathrm{d}t )$. Multiply each equation through by $\mu(z)$ to get $$ \mu(z) g'(z) + \mu(z)p(z) g(z) = 0 \text{ and } \mu(z)g'(z) + \mu(z)p(z) g(z) = \mu(z)q(z).$$ The integrating factor $\mu(z)$ is designed so that the left-hand sides are result of product rules, as $\frac{d}{dz} \mu(z) = \mu(z) p(z)$. This yields $$\frac{d}{dz} \left[ \mu(z) g(z) \right] = 0 \text{ and } \frac{d}{dz} \left[ \mu(z) g(z) \right] = \mu(z)q(z).$$ Integrate both sides and solve for $g(z)$: $$g(z) = \frac{c_1}{\mu(z)} \text{ and } g(z) = \frac{ \int \mu(z) q(z) ~\mathrm{d}z}{\mu(z)}.$$
For these particular problems, we find that \begin{align*} \mu(z) &= (z-1)^2 e^{-\frac{b}{z-1}} \\ g_1(z)&= \frac{c_1}{\mu(z)} =\frac{c_1 e^{\frac{b}{z-1}}}{(z-1)^2} \\ g_2(z)&= \frac{c_2 e^{\frac{b}{z-1}}}{(z-1)^2}+\frac{e^{\frac{b}{z-1}} \left((z-1) \left(-e^{-\frac{b}{z-1}}\right)-b \text{Ei}\left(-\frac{b}{z-1}\right)\right)}{(z-1)^2} \end{align*} where $g_1$,$g_2$ are the solutions for the first and second differential equations respecitively, and $Ei(z)$ is the exponential integral function: $Ei(z) = \int_{-z}^\infty e^{-t}/t ~\mathrm{d}t$.
- 5,287
- 16
- 34
-
Does this mean that equation *1 and the equation after that in the link are wrong? – tyobrien Apr 05 '17 at 04:18
-
Nope, they look equivalent (outside of forgetting constants of integration!) – erfink Apr 05 '17 at 04:20
-
In the linked answer, equation 1 only matches your equation for $g_2$ when $c_2=b{\mathrm Ei(b)}$. Could you please detail a bit why this is the answer provided in the link? – tyobrien Apr 06 '17 at 02:26
-
And based on the reasoning for choosing $c_2$, what should $c_1$ be? – tyobrien Apr 06 '17 at 03:03