# Finding the solution to a second order ordinary differential equation where one solution is already known

The following problem is from the book "Introduction to Ordinary Differential Equations" by Shepley L. Ross. Below is my solution to the problem, which I believe is wrong. In any case, it does not match the answer in the book. I am hoping somebody here can tell me where I went wrong.
Thanks,
Bob
Problem:
Given that $$y = e^{2x}$$ is a solution of $$(2x+1)y'' - 4(x+1)y' + 4y = 0$$ find a linearly independent solution by reducing the order. Write the general solution.
Let $$f(x)$$ represent the solution we have. $$\begin{eqnarray*} f(x) &=& e^{2x} \\ y &=& f(x) v = e^{2x}v \\ y' &=& e^{2x} v' + 2ve^{2x} \\ y'' &=& e^{2x} v'' + 2e^{2x}v' + 4ve^{2x} + 2v'e^{2x} \\ y'' &=& e^{2x} v'' + 4e^{2x}v' + 4ve^{2x} \\ \end{eqnarray*}$$ $$\begin{eqnarray*} (2x+1)(e^{2x} v'' + 4e^{2x}v' + 4ve^{2x}) - 4(x+1)(e^{2x} v' + 2ve^{2x}) + 4e^{2x}v &=& 0 \\ (2x+1)( v'' + 4v' + 4v) - 4(x+1)( v' + 2v) + 4v &=& 0 \\ (2x+1)( v'' + 4v' + 4v) - 4(x+1)( v') - 4(x+1)(2v) + 4v &=& 0 \\ (2x+1)( v'' + 4v' + 4v) - 4(x+1)( v') - 8xv - 8v + 4v &=& 0 \\ (2x+1)( v'' + 4v' + 4v) - 4(x+1)( v') - 8xv - 4v &=& 0 \\ (2x+1)(v'' + 4v' + 4v) + (2x+1)(4v)- 4(x+1)( v') - 8xv - 4v &=& 0 \\ (2x+1)( v'' + 4v' + 4v) - 4(x+1)( v') - 8xv - 4v &=& 0 \\ \end{eqnarray*}$$ $$\begin{eqnarray*} (2x+1)( v'' + 4v' ) - 4(x+1)( v') &=& 0 \\ (2x+1)( v'' + 4v' ) - 4x( v') - 4 v' &=& 0 \\ (2x+1)( v'') + (2x+1)(4v' ) - 4x( v') - 4 v' &=& 0 \\ (2x+1)( v'') + 4xv' &=& 0 \\ (2x+1)v''+ 4xv' &=& 0 \\ \end{eqnarray*}$$ Let $$w = \frac{dv}{dx}$$. $$\begin{eqnarray*} (2x+1)\frac{dw}{dx} + 4xw &=& 0 \\ \frac{dw}{w} + \frac{dx}{2x+1} &=& 0 \\ \int \frac{dw}{w} \,\, dx + \int \frac{dx}{2x+1} \,\, dx &=& \int 0 \,\, dx \\ \end{eqnarray*}$$ Now to perform this integration: $$\int \frac{dx}{2x+1} \,\, dx$$ we use the substitution $$u_1 = 2x + 1$$ which gives $$du_1 = dx$$. $$\begin{eqnarray*} 2x &=& u_1 - 1 \\ 4x &=& 2u_1 - 2 \\ \int \frac{dx}{2x+1} \,\, dx &=& \int \frac{2u_1-2}{u_1} \,\, du_1 = \int 2 \,\, du_1 - \int \frac{2}{u_1} \,\, du_1 \\ \int \frac{dx}{2x+1} \,\, dx &=& 2(2x+1) - 2 \ln{|2x+1|} + C_1 \\ \end{eqnarray*}$$ $$\begin{eqnarray*} \ln{|w|} + 2(2x+1) - 2 \ln{|2x+1|} + C_1 &=& 0 \\ \ln{|w|} + \ln{e^{(4x+2)}} - 2 \ln{|2x+1|} + C_1 &=& 0 \\ \ln{\bigg|\frac{we^{(4x+2)}}{(2x+1)^2}\bigg|} &=& -C_1 \\ \frac{we^{(4x+2)}}{(2x+1)^2} &=& C_2 \\ \end{eqnarray*}$$ $$\begin{eqnarray*} w &=& \frac{dv}{dx} = C_2 \left( \frac{(2x+1)^2}{e^{(4x+2)}} \right) = C_2 \left( \frac{(2x+1)^2}{e^{2x+1}e^{2x+1}} \right) \\ dv &=& \frac{C_2(2x+1)^2}{e^{2x+1}e^{2x+1}} \, dx \\ \end{eqnarray*}$$ Using an online integral calcuator, we find: $$\int \frac{(2x+1)^2}{e^{2x+1}e^{2x+1}} \,\, dx = -\frac{(8x^2+12+5)e^{-4x-2}}{8} + C_3$$ $$\begin{eqnarray*} v &=& -\frac{C_2(8x^2+12+5)e^{-4x-2}}{8} + C_3 \\ v &=& e^{-2x}y \\ e^{-2x}y &=& -\frac{C_2(8x^2+12+5)e^{-4x-2}}{8} + C_3 \\ \end{eqnarray*}$$ However, the book's answer is:
$$y = c_1e^{2x} + c_2(x+1)$$
At the point $$(2x+1)\frac{dw}{dx} + 4xw = 0$$ you missed to transfer the factor $$4x$$ to the next step. It should be $$\frac{dw}{w} + \frac{4x\,dx}{2x+1} = 0 ,$$ so that then \begin{align} \frac{dw}{w} + 2\,dx -\frac{2\,dx}{2x+1} &= 0 \\ \implies \ln|w|+2x-\ln|2x+1|&=c,\\ v'=w&=Ce^{-2x}(2x+1),\\ v&=-Ce^{-2x}(x+1),\\ y=e^{2x}v&=-C(x+1) \end{align}
Then, after this factor miraculously re-appears in the discussion of the $$u_1$$ substitution, you simply replaced $$dx$$ with $$du_1$$, while the correct formula is $$u_1=2x+1\implies du_1=2\,dx$$.
This reduction by a factor then exponent $$2$$ then also decreases the complexity in the ensuing computations.
(Btw., the eqnarray environment was declared obsolete decades ago. Use align and related environments. Read the official l2tabu guide in the LaTeX2e documentation.)