# Help solving 2nd order, initial value problem

#### SterlingM

Hi, I have an initial value problem to solve for a second order differential equation. Currently in my class, we have learned undetermined coefficients, characteristic equations, variation of parameters

The questions is:

Code:
Solve the initial value problem:

y'' + y = x
y(0)=1, y'(0)=1
Okay, so first I need to find the general solution. The only method we've learned for finding the general solution of a non-homogeneous, second order differential equation is variation of parameters. But to use that method, we first need to find two solutions for the homogeneous form.

If we use the characteristic equation method, we end up with

Code:
[FONT=arial]y = C[SUB]1[/SUB]*e[SUP]-x[/SUP] + C[SUB]2[/SUB]*e[SUP]-x[/SUP] = e[SUP]-x[/SUP] (C[SUB]1[/SUB]+C[SUB]2[/SUB])
[/FONT]

Now I'm not sure how to proceed. The only way I can see to get two linearly independent solutions is by setting one of the terms to ln(x). So we could do the following:

Code:
C[SUB]1[/SUB]=1, C[SUB]2[/SUB]=0
y[SUB]1[/SUB] = e[SUP]-x[/SUP]

C[SUB]1[/SUB]=ln(x), C[SUB]2[/SUB]=0
y[SUB]2[/SUB] = -1
Then when I try to use variation of parameters, solving for u and v in y=u'*y1 + v'*y2, I end up with the integral:

Code:
[TEX]$u = \int \frac{x}{e^{-x}}$[/TEX]
And it's not clear to me how to integrate that function. So I'm wondering if 1) I'm approaching this wrong at some point, 2) I just made a mistake somewhere along the line, or 3) if I'm missing something really obvious and over-complicating the problem.

Thanks for any help.

Last edited:

#### Prove It

MHF Helper
For your DE \displaystyle \begin{align*} \frac{\mathrm{d}^2y}{\mathrm{d}x^2} + y = x \end{align*}, when you solve the homogeneous equation your characteristic equation is \displaystyle \begin{align*} m^2 + 1 = 0 \implies m = \pm \mathrm{i} \end{align*}, so the homogeneous solution is \displaystyle \begin{align*} y_h = A\cos{(x)} + B\sin{(x)} \end{align*}.

Now I would lean towards using undetermined coefficients to get a particular solution.

1 person

#### SterlingM

Thanks for your response! I definitely missed that I ended up with $$\displaystyle r^2 = -1$$.

I am having some trouble seeing how you get $$\displaystyle y_h = Acos(x) + Bsin(x)$$. Could you expand on that some? I am looking here:

From what I have learned, after finding the roots of the characteristic equation, we set up the solution as:

$$\displaystyle y = C_1e^{r_1x} + C_2e^{r_2x}$$

So if our roots are i and -i, then our homogeneous solution would be:

$$\displaystyle y = C_1e^{ix} + C_2e^{-ix}$$

I'm trying to find some relation between what you wrote and this solution...this link: Pauls Online Notes : Complex Number Primer - Polar and Exponential Forms shows $$\displaystyle e^{i*\theta} = cos(\theta) + isin(\theta)$$, so I guess we could set up our homogeneous solution as:

$$\displaystyle y = C_1e^{i*1} + C_2e^{-i*1} = C_1(cos(1) + isin(1)) + C_2(cos(-1) + isin(-1))$$

I've tried to simplify it some, but I can't seem to get $$\displaystyle y = C_1cos(x) + C_2sin(x)$$ (assuming that $$\displaystyle C_1=A$$ and $$\displaystyle C_2=B$$) so I'm not sure how you got that solution. Can you explain it a bit more or link me to somewhere that would explain it?

#### Archie

where $A = C_1 + C_2$ and $B = (C_1 - C_2) \i$

1 person