# Homework Help: Non linear nonhomogenous ODE

1. Nov 3, 2008

### DreDD

1. The problem statement, all variables and given/known data

y' + y = t^2 , y(0) = 6, y'(0)= -6

2. Relevant equations

3. The attempt at a solution

first i tried to seperate variables using y = ux but cant forward on and then i tried undetermined coeff. method. i found homogenous and particular solution but i am not sure about the solution because there is no need to use y'(0)=-6 and i really dont sure can i use this method for the first order ode.

2. Nov 3, 2008

### gabbagabbahey

If you show me your homogeneous and particular solutions, I'll stand a better chance of telling you what is wrong with them than if I just wildly guess at what you may have done wrong! ;0)

3. Nov 3, 2008

### DreDD

x+1 = 0
x = -1

Yh = c1 e^-x

Yp= K2 x^2 + K1x + K0 and take Yp' and write the Yp and Yp' to the eq'n find K2, K1 and K0

Yp = x^2 - 2x +2

Y = c1 e^-x + x^2 - 2x + 2

there is only c1 and i dont need the second initial value

4. Nov 3, 2008

### gabbagabbahey

and since y'(t)+y(t)=t^2, y'(0)+y(0)=0 => y'(0)=-y(0) which is consistent with your initial values, and so you can use either of them to find c1.

If on the other hand, you were given y(0)=6 and y'(0)=3, then there would be no solution since these initial conditions are inconsistent with your ODE.

Luckily, your initial conditions are consistent and so your method and solution are correct!

5. Nov 3, 2008

### DreDD

thanks for the help yes u r right it should be t . i dont like t :D

6. Nov 3, 2008

### tiny-tim

t is good for you!

welcome to PF!

7. Nov 3, 2008

### DreDD

thx :D but it confuses my mind :D

by the way any other ways to solve this eq'n?

8. Nov 3, 2008