# Solve second order linear differential equation

• I
• lriuui0x0
In summary, the conversation discusses the second order linear ODE with parameters a and b and the series solution for y. Two solutions are obtained in the form of M(x,a,b) and x^(1-b)M(x,a-b+1,2-b), where M is a function found after solving the recurrence coefficients. The question raised is how to obtain a second independent solution when b=1, and the hint of considering the limit is given. The correct solution is found to be y=-M(x,a,1)ln x -3∂M/∂b(x,a,1) and it is shown to be linearly independent from y1. The Wronskian is also calculated to confirm the independence of
lriuui0x0
Consider the second order linear ODE with parameters ##a, b##:

$$xy'' + (b-x)y' - ay = 0$$

By considering the series solution ##y=\sum c_mx^m##, I have obtained two solutions of the following form:

\begin{aligned} y_1 &= M(x, a, b) \\ y_2 &= x^{1-b}M(x, a-b+1, 2-b) \\ \end{aligned}

Where ##M## is a function after solving the recurrence coefficients, please feel free to check if my result is correct:

$$M(x, a, b) = \sum_{m=0}^\infty \frac{\prod_{i=0}^{m-1}(a+i)}{m!\prod_{i=0}^{m-1}(b+i)}x^m$$

The question is if ##b=1##, we get repeated root and ##y_1 = y_2## hence linearly dependent. How to obtain a second independent solution? The problem has a hint of considering the following limit:

$$\lim_{b \to 1} \frac{y_2 - y_1}{b - 1}$$

I observe in case ##a=b## the solution, other than trivial y=const,. is ##y=Ce^x## which meets with your result. It shows any constant A could be multiplied. For general a, b by transforming
$$y=e^{z(x)}$$ to see differential equation of z, could you check/correct
$$y=Ce^{\frac{a}{b}x}$$
is a solution ?

Last edited:
anuttarasammyak said:
I observe in case ##a=b## the solution, other than trivial y=const,. is ##y=Ce^x## which meets with your result. It shows any constant A could be multiplied. For general a, b by transforming
$$y=e^{z(x)}$$ to see differential equation of z, could you check/correct
$$y=Ce^{\frac{a}{b}x}$$
is a solution ?
It's not a solution:

let ##y=e^{\frac{a}{b}x}##, then the LHS of the differential equation is:

$$\frac{a^2}{b^2}xe^{\frac{a}{b}x} + (b-x) \frac{a}{b}e^{\frac{a}{b}x} - ae^{\frac{a}{b}x} \ne 0$$

anuttarasammyak
Thank you so much for correction. Following your way I got
$$c_{m+1}=\frac{a+m}{(m+1)(b+m)}c_m$$
for m=0,1,2,.. with ##c_0## given which is your ##y_1##. I do not find the way to get ##y_2##.

lriuui0x0 said:
Consider the second order linear ODE with parameters ##a, b##:

$$xy'' + (b-x)y' - ay = 0$$

By considering the series solution ##y=\sum c_mx^m##, I have obtained two solutions of the following form:

\begin{aligned} y_1 &= M(x, a, b) \\ y_2 &= x^{1-b}M(x, a-b+1, 2-b) \\ \end{aligned}

Where ##M## is a function after solving the recurrence coefficients, please feel free to check if my result is correct:

$$M(x, a, b) = \sum_{m=0}^\infty \frac{\prod_{i=0}^{m-1}(a+i)}{m!\prod_{i=0}^{m-1}(b+i)}x^m$$

Applying Frobenius' Method and setting $y = \sum_{n=0}^\infty c_nx^{n+r}$ with $c_0 \neq 0$ I obtained the indicial equation $r(r - 1 + b) = 0$ and the recurrence relation $$c_{n+1} = \frac{n + r + a}{(n + r + 1)(n + r + b)}c_n$$ which are consistent with your result, althouh I would have used the property of the Gamma function that $\Gamma(z + 1) = z \Gamma(z)$ to evaluate the products.

(@anuttarasammyak: Just using an integer power series, which to be fair is what @lriuui0x0 said they did, won't pick up the $r = 1 - b$ solution.)

The question is if ##b=1##, we get repeated root and ##y_1 = y_2## hence linearly dependent. How to obtain a second independent solution? The problem has a hint of considering the following limit:

$$\lim_{b \to 1} \frac{y_2 - y_1}{b - 1}$$

$y_1$ and $(y_2 - y_1)/(b-1)$ are linearly independent for any $b \neq 1$; for $b = 1$ you can use l'Hopital's rule to calculate $$\lim_{b \to 1} \frac{x^{1-b}M(x,a-b+1, 2-b) - M(x,a,b)}{b-1} = - M(x,a,1)\log x - \left.\frac{\partial M}{\partial a}\right|_{(x,a,1)} - 2\left.\frac{\partial M}{\partial b}\right|_{(x,a,1)}$$ and show that the result is a solution of the ODE which is linearly independent of $M(x,a,1)$.

Last edited:
anuttarasammyak
pasmith said:
Applying Frobenius' Method and setting $y = \sum_{n=0}^\infty c_nx^{n+r}$ with $c_0 \neq 0$ I obtained the indicial equation $r(r - 1 + b) = 0$ and the recurrence relation $$c_{n+1} = \frac{n + r + a}{(n + r + 1)(n + r + b)}c_n$$ which are consistent with your result, althouh I would have used the property of the Gamma function that $\Gamma(z + 1) = z \Gamma(z)$ to evaluate the products.

(@anuttarasammyak: Just using an integer power series, which to be fair is what @lriuui0x0 said they did, won't pick up the $r = 1 - b$ solution.)
$y_1$ and $(y_2 - y_1)/(b-1)$ are linearly independent for any $b \neq 1$; for $b = 1$ you can use l'Hopital's rule to calculate $$\lim_{b \to 1} \frac{x^{1-b}M(x,a-b+1, 2-b) - M(x,a,b)}{b-1} = - M(x,a,1)\log x - \left.\frac{\partial M}{\partial a}\right|_{(x,a,1)} - 2\left.\frac{\partial M}{\partial b}\right|_{(x,a,1)}$$ and show that the result is a solution of the ODE which is linearly independent of $M(x,a,1)$.
Just to double check on these steps. I got slightly different result compared with yours that doesn't involve partial derivative of ##a##. Does it look correct?

Expand the limit with l'Hopital's rule:

\begin{aligned} &\phantom{{}={}}\lim_{b\to 1}\frac{y_2-y_1}{b-1} \\ &= \biggl[\frac{\partial}{\partial b}(x^{1-b}M(x,a-b+1,2-b) - M(x,a,b))\biggr]_{b=1} \\ &= \biggl[-x^{1-b}\ln x M(x,a-b+1,2-b) + x^{1-b}\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[\frac{\partial M(x,a,b)}{\partial b}(-2) - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x - 3\frac{\partial M}{\partial b}(x,a,1) \\ \end{aligned}Check the Wronskian of ##y_1 = M(x,a,1)## and ##y_2 = -M(x,a,1)\ln x - 3\frac{\partial M}{\partial b}(x,a,1)##:\begin{aligned} &\phantom{{}={}} y_1y_2'-y_2y_1' \\ &= M(x,a,1)(-\frac{\partial M}{\partial x}(x,a,1)\ln x - M(x,a,1)\frac{1}{x} - 3\frac{\partial^2M}{\partial x\partial b}(x,a,1)) - \frac{\partial M}{\partial x}(x,a,1)(-M(x,a,1)\ln x - 3\frac{\partial M}{\partial b}(x,a,1)) \\ &= -M(x,a,1)^2 \frac{1}{x} -3M(x,a,1)\frac{\partial^2M}{\partial x\partial b}(x,a,1) + 3\frac{\partial M}{\partial x}(x,a,1)\frac{\partial M}{\partial b}(x,a,1) \end{aligned}When ##x \to 0##, the Wronskian diverges because of the ##\frac{1}{x}## term, so it's non-zero. Hence ##y_1, y_2## are independent.

lriuui0x0 said:
Just to double check on these steps. I got slightly different result compared with yours that doesn't involve partial derivative of ##a##. Does it look correct?

Expand the limit with l'Hopital's rule:

\begin{aligned} &\phantom{{}={}}\lim_{b\to 1}\frac{y_2-y_1}{b-1} \\ &= \biggl[\frac{\partial}{\partial b}(x^{1-b}M(x,a-b+1,2-b) - M(x,a,b))\biggr]_{b=1} \\ &= \biggl[-x^{1-b}\ln x M(x,a-b+1,2-b) + x^{1-b}\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[\frac{\partial M(x,a,b)}{\partial b}(-2) - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x - 3\frac{\partial M}{\partial b}(x,a,1) \\ \end{aligned}

You haven't checked that $-M(x,a,1) \ln x - 3\frac{\partial M}{\partial b}$ actually solves the ODE; it doesn't. If $L(y) = xy'' + (b-x)y' - ay$ then differentiating partially with respect to $b$ results in $$\frac{\partial}{\partial b}L(y) = L\left(\frac{\partial y}{\partial b}\right) + y'$$ and you can also show that $$L(y \ln x) = L(y) \ln x + 2y' - y + \frac{(b-1)y}{x}.$$ Since $L(M) = 0$ for all $a$ and $b$ you can see that $$L\left(M \ln x + 3 \frac{\partial M}{\partial b}\right) = -M' - M$$ when $b = 1$.

The problem is that you haven't calculated the derivative of $M(x,a-b+1, 2-b)$ with respect to $b$ correctly. By $\frac{\partial M}{\partial b}$ we mean the derivative of $M(x,a,b)$ with respect to $b$ with $x$ and $a$ constant. But you are looking at $f(x,a,b) = M(x, g(a,b),h(a,b))$ with $g(a,b) = a-b+1$ and $h(a,b) = 2 - b$ rather than $M(x,a,b)$. The multivariate chain rule then gives $$\frac{\partial f}{\partial b} = -\frac{\partial M}{\partial a} - \frac{\partial M}{\partial b},$$ and we must evaluate the derivatives of $M$ at $(x, a-b+1, 2-b)$ rather than at $(x,a,b)$. In the limit, of course, these are both $(x,a,1)$.

pasmith said:
You haven't checked that $-M(x,a,1) \ln x - 3\frac{\partial M}{\partial b}$ actually solves the ODE; it doesn't. If $L(y) = xy'' + (b-x)y' - ay$ then differentiating partially with respect to $b$ results in $$\frac{\partial}{\partial b}L(y) = L\left(\frac{\partial y}{\partial b}\right) + y'$$ and you can also show that $$L(y \ln x) = L(y) \ln x + 2y' - y + \frac{(b-1)y}{x}.$$ Since $L(M) = 0$ for all $a$ and $b$ you can see that $$L\left(M \ln x + 3 \frac{\partial M}{\partial b}\right) = -M' - M$$ when $b = 1$.

The problem is that you haven't calculated the derivative of $M(x,a-b+1, 2-b)$ with respect to $b$ correctly. By $\frac{\partial M}{\partial b}$ we mean the derivative of $M(x,a,b)$ with respect to $b$ with $x$ and $a$ constant. But you are looking at $f(x,a,b) = M(x, g(a,b),h(a,b))$ with $g(a,b) = a-b+1$ and $h(a,b) = 2 - b$ rather than $M(x,a,b)$. The multivariate chain rule then gives $$\frac{\partial f}{\partial b} = -\frac{\partial M}{\partial a} - \frac{\partial M}{\partial b},$$ and we must evaluate the derivatives of $M$ at $(x, a-b+1, 2-b)$ rather than at $(x,a,b)$. In the limit, of course, these are both $(x,a,1)$.
Thanks @pasmith ! I found the error according to your correction, could you please check now? Especially if the argument on linear independence of the two solutions is valid?Expand the limit with l'Hopital's rule:
\begin{aligned} &\phantom{{}={}}\lim_{b\to 1}\frac{y_2-y_1}{b-1} \\ &= \biggl[\frac{\partial}{\partial b}(x^{1-b}M(x,a-b+1,2-b) - M(x,a,b))\biggr]_{b=1} \\ &= \biggl[-x^{1-b}\ln x M(x,a-b+1,2-b) + x^{1-b}\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[\frac{\partial M(x,a-b+1,2-b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x + \biggl[-\frac{\partial M(x,a,b)}{\partial a} -\frac{\partial M(x,a,b)}{\partial b} - \frac{\partial M(x,a,b)}{\partial b}\biggr]_{b=1} \\ &= -M(x,a,1)\ln x - \frac{\partial M}{\partial a}(x,a,1) - 2\frac{\partial M}{\partial b}(x,a,1) \\ \end{aligned}
Consider the differential operator ##L(y) = xy'' + (b-x)y' -ay##, then consider ##L(y\ln x)##, ##\frac{\partial}{\partial b}L(y)## and ##\frac{\partial}{\partial a}L(y)##:
\begin{aligned} &\phantom{{}={}} L(y\ln x) \\ &= x(y\ln x)'' + (b-x)(y\ln x)' - a(y\ln x) \\ &= xy''\ln x +2y' - y\frac{1}{x} + (b-x)y' \ln x + (b-x)y\frac{1}{x} - ay\ln x \\ &= \ln x(xy'' + (b-x)y' -ay) + 2y' -y + (b-1)y\frac{1}{x} \\ &= \ln x L(y) + 2y' -y + (b-1)y\frac{1}{x} \\ \end{aligned}

\begin{aligned} &\phantom{{}={}} \frac{\partial}{\partial b}L(y) \\ &= \frac{\partial}{\partial b}(xy'' + (b-x)y' - ay) \\ &= x\frac{\partial }{\partial b}y'' + y' +(b-x)\frac{\partial}{\partial b}y' - a\frac{\partial}{\partial b}y \\ &= x(\frac{\partial y}{\partial b})'' + (b-x) (\frac{\partial y}{\partial b})' - a\frac{\partial y}{\partial b} + y' \\ &= L(\frac{\partial y}{\partial b}) + y' \end{aligned}

\begin{aligned} &\phantom{{}={}} \frac{\partial}{\partial a}L(y) \\ &= \frac{\partial}{\partial a}(xy'' + (b-x)y' - ay) \\ &= x\frac{\partial }{\partial a}y'' +(b-x)\frac{\partial}{\partial b}y' - y -a\frac{\partial}{\partial a}y \\ &= x(\frac{\partial y}{\partial a})'' + (b-x) (\frac{\partial y}{\partial a})' - a\frac{\partial y}{\partial a} -y \\ &= L(\frac{\partial y}{\partial a}) - y \end{aligned}
Check ##y_2 = -M(x,a,1)\ln x - \frac{\partial M}{\partial a}(x,a,1) - 2\frac{\partial M}{\partial b}(x,a,1)## is indeed a solution to the differential equation:
\begin{aligned} &\phantom{{}={}} L(y_2) \\ &= -L(M \ln x) - L(\frac{\partial M}{\partial a}) - 2L(\frac{\partial M}{\partial b}) \\ &= -\ln xL(M) - 2M' +M -\frac{\partial}{\partial b}L(M) - M -2\frac{\partial}{\partial a}L(M) + 2M' \\ &= 0 \end{aligned}
Check the Wronskian of ##y_1 = M(x,a,1)## and ##y_2 = -M(x,a,1)\ln x - \frac{\partial M}{\partial a}(x,a,1) - 2\frac{\partial M}{\partial b}(x,a,1)##:
\begin{aligned} &\phantom{{}={}} y_1y_2'-y_2y_1' \\ &= M(-M'\ln x - M\frac{1}{x} - (\frac{\partial M}{\partial a})' -2(\frac{\partial M}{\partial b})') - M'(-M\ln x -\frac{\partial M}{\partial a} -2\frac{\partial M}{\partial b}) \\ &= -M^2 \frac{1}{x} -M(\frac{\partial M}{\partial a})' + M'\frac{\partial M}{\partial a} -2M(\frac{\partial M}{\partial a})' + 2M'\frac{\partial M}{\partial b} \end{aligned}
When ##x \to 0##, the Wronskian diverges because of the ##\frac{1}{x}## term, so it's non-zero. Hence ##y_1, y_2## are independent.

Last edited:

## What is a second order linear differential equation?

A second order linear differential equation is a mathematical equation that involves the second derivative of a function, as well as the function itself and its first derivative. It is called "linear" because the function and its derivatives appear in a linear fashion, with no exponents or other nonlinear terms.

## How do you solve a second order linear differential equation?

To solve a second order linear differential equation, you need to find a function that satisfies the equation. This can be done by using various methods such as the method of undetermined coefficients, variation of parameters, or the Laplace transform. The solution will typically involve two constants, which can be determined by using initial conditions or boundary conditions.

## What is the difference between a homogeneous and non-homogeneous second order linear differential equation?

A homogeneous second order linear differential equation has a right-hand side of 0, meaning that the equation is equal to 0. A non-homogeneous second order linear differential equation has a non-zero right-hand side, meaning that the equation is equal to some function. The methods for solving these types of equations are slightly different.

## What are initial conditions and why are they important in solving a second order linear differential equation?

Initial conditions are values given for the function and its derivative at a specific point. These conditions are important because they help determine the values of the two constants in the solution to the differential equation. Without initial conditions, the solution would have an infinite number of possible solutions.

## Can a second order linear differential equation have complex solutions?

Yes, a second order linear differential equation can have complex solutions. This can occur when the coefficients of the equation are complex numbers. The solution will involve complex exponential functions, which can be simplified using Euler's formula.

### Similar threads

• Differential Equations
Replies
2
Views
1K
• Differential Equations
Replies
2
Views
2K
• Differential Equations
Replies
2
Views
2K
• Differential Equations
Replies
2
Views
299
• Differential Equations
Replies
52
Views
1K
• Differential Equations
Replies
3
Views
1K
• Differential Equations
Replies
3
Views
1K
• Differential Equations
Replies
7
Views
2K
• Differential Equations
Replies
3
Views
950
• Differential Equations
Replies
1
Views
2K