# variation of parameters (constants)

I'm stuck with two problems that are aimed at introducing shortly the method of variation of parameters in order to solve a differential equation. The problems are:

$x\cdot y(x)'+y(x)=x^2;\ y(1)=1$

and

$u'(t)+\frac{u}{1+t}=exp(2t);\ u(0)=4.$

I have tried to understand the method, but I have not arrived anywhere yet. Can someone please help me get started?

-Marie :)

-
Do you mean $xy(x)'+y(x)=x^2$? – Josué Mar 14 '12 at 19:19
At what part of the method in particular are you stuck? – anon Mar 14 '12 at 19:20

For the first one, note that the left-hand side can be "factored" as $(xy)'$, as it is just the result of the basic product rule. Can you integrate with a $+C$ and figure it out from there? For the second one, in keeping with the method of variation of parameters: what would you need to multiply both sides of the equation by so that the left-hand factors as a derivative of a product again? Symbolically, that means that $q(t)u'+\frac{q(t)}{1+t}u$ (after multiplying by $q$) factors to $\big(p(t)u\big)'$ for some $p$ and $q$. Expand out the latter with the chain rule and see if you can progress from there.
Thank you! Now I got the first one, I will double-check next time if such a trick is possible, but for the second one, I have tried to find such $p$ and $q$, and figured that $p'=q/(1+t)$ and $p=q$, so $q/(1+t)=q'$. Such a $q$ would then be $c(1+t)$. Then $(u(1+t))'=exp(2t)*(1+t)$, we integrate on both sides to get $u(1+t)=1/4*exp(2t)*(2t+1)+C$ and then we have the result! Great! <3 – Marie. P. Mar 14 '12 at 20:03
okay, I've tried to find $u(t)$ as above, i.e. $u=\frac{exp(2t)(2t+1)}{4(t+1)}$, but somehow my result does not work out. Can anyone spot the mistake? I must be so close, but I don't see where I am wrong! – Marie. P. Mar 14 '12 at 20:40
@MarieP: Good job! You forgot about the big $C$: plug in $t=0$ to find that $$u(0)(1+0)=\frac{1}{4}e^{2(0)}(2\cdot0+1)+C \implies C=15/4.$$ Put that into the solution and you have $$u(t)=\frac{(2t+1)e^{2t}+15}{4}.$$ – anon Mar 15 '12 at 4:01