I tried to solve this ODE by pencil and paper:


I got complementary solution of: $$y_c=c_1e^x+c_2e^xx$$

and I worked out the particular solution using variation of parameters method and I got: $$y_p=-e^xx+e^xx\ln| x| $$

Now the first term in particular solution is repeated (second term of complementary solution), I checked WA for the solution and it was:

$$y(x)=c_1e^x+c_2e^xx+e^xx\ln x$$

My question is: Why we didn't multiply this repeated term $(e^xx)$ by $x$ as we do in Undetermined Coefficients method?


  • $\begingroup$ If -in another problem- the $y_p$ found by VoP is only one term - say $e^xx$ and this one term is found also in the homogeneous solution, shouldn't I multiply it by $x$ ? $\endgroup$ – Mohamed Mostafa Sep 20 '16 at 0:48

I am not sure to be answering your question.

Life could have been easier if, from the very beginning, you would have defined $$y=e^x \,z\qquad y'=e^x z'+e^x z\qquad y''=e^x z''+2 e^x z'+e^x z$$ which would have transformed the differential equation to $$e^x z''=\frac {e^x} x\implies z''=\frac 1x $$ Integrating a first time $$z'=\log(x)+c_1$$ and a second time $$z=x \log (x)-x+c_1x+c_2=x \log (x)+(c_1-1)x+c_2=x \log (x)+c_3x+c_2$$ making finally $$y=e^x\left(x \log (x)+c_3x+c_2 \right)$$

Making the problem more general such as $$y''-2y'+y=\frac{e^x}{f(x)}$$ the same method would have given $$z''=f(x)$$

  • $\begingroup$ My question is why we multiply by $x$ in undetermined coefficients while we don't in variation of parameters? $\endgroup$ – Mohamed Mostafa Sep 20 '16 at 13:11

Methods of Undetermined Coefficients: you must multiply by some $x$ to ensure that we can get both the homogeneous case (when we find the complementary solution) and the non-homogeneous case (when we later find the particular solution).

If we do not multiply by $x$, we can be sure that the homogeneous case will work because the exponential's derivative is itself. However, if I solve for $g(x)$ after deriving the complementary solution, then I must also have some value that ensures that after taking the derivatives needed for the differential equation, that it will be some non-zero function, in which $g(x) \ne 0$.

Example: $y''- 4y'-5= e^x$, where $y_{1}=e^{-x}$ and $y_{2} = e^{5x}$

$y_{1}$ and $y_{2}$ are created with $g(x)=0$, but $g(x)$ is not actually $0$. Thus, the $y_{p}$ must be altered to ensure that when we are trying to find constants such as $A$, $B$, etc., we do not get rid of the answer. If we use $y_{1}$ or $y_{2}$, then we will be forcing the $y_{p}$ to be $0$. Say y$p = Ae^{5x}$, then $y'= 5Ae^{5x}$, and $y''=25Ae^{5x}$, which will give $0=e^x$... not true!

Variation of Parameters: this blatantly makes the assumption that the particular solution has components that are linearly related to $y_{1}$ and $y_{2}$. However, there is no need to multiply by $x$ because we do not have to find any constants $A$, $B$, etc, which means that there is no reason to ensure that our $y_{p}$ is not linearly related to $y_{1}$ and/or $y_{2}$ (we need them to be disparate to find those constants!) because the manner in which we solve for the particular solution in variation of parameters does not preclude us to tinker with $g(x)$ save in the integrals for finding $v_{1}$ and $v_{2}$ that would make us even have $g(x)=0$. We do not care about linearity between any terms. That can be altered as I explain below, for the example given.

For your example with variation of parameters, it does not require multiplication because we can combine the constant, $c_{1}$, from the $y_{c}$ and the $-1$ from the $y_{p}$ with the term $e^x$ to get $c_{1}-1$, which can be simplified to $c_{1}$ yet again. You do not need to avoid $g(x) = 0$ because it will be used in the integrals with $y_{1}$, $y_{2}$ and the Wronskian.

You should not question why it is not done in VofP but rather why it is done in MofUC. That will answer your question. :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.