# Solve DE using integ factor, please check work thanks

1. May 24, 2010

### darryw

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

R dQ/dt + Q/C = 0 .....Q(0) = Q_0

dQ/dt = - Q/RC

integrating factor: mu(x) = e^integ(1/RC)
mu(x) = e^(t/RC)

(e^(t/RC) Q)' = integ 0

e^(t/RC) Q = t + c

Q = te^-(t/RC) + ce^-(t/RC)

then apply initial conditions of Q(0) = Q_0

Q_0 = c

the last part seems sort of weird to me?? thanks
2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. May 24, 2010

### Cyosis

By simply plugging your solution into the differential equation you would've noticed that your solution is wrong. Why are you using an integrating factor on a separable differential equation?

integ 0 != t+c

3. May 24, 2010

### darryw

yes i noticed it can be solved as separable, but shouldnt it give same answer using integrating factor?

my mistake was integral of zero is not t, it is just the arb constant, c
so...

(e^(t/RC) Q)' = integ 0

e^(t/RC) Q = c

Q = c^e^-(t/RC)

is this correct (so far) ? thanks

4. May 24, 2010

### Cyosis

You have raised the constant to the power of the exponent. I reckon that is a typo? If it is a typo then yes your answer is correct.

5. May 24, 2010

### darryw

thanks.. yup, typo..should be..
Q = ce^-(t/RC)

how exactly do i apply the init cond though?
it says Q(0) = Q_0, so doesn't that mean:

Q_0 = ce^-(0/RC)

Q_0 = c ?

this is what confuses me, because i am used to initial conditions being something like y(0) = 1, for example, then i just plug in the y value and x value to solve for the constant.. but when it says Q(0) = Q_0, i dont know what the problem is asking??
thanks.

6. May 24, 2010

### Cyosis

You should think of it like this. You have a solution $Q(t)$ and an initial condition $Q(0)=Q_0$. This tells you that your general solution $Q(t)$ must be equal to $Q_0$ when $t=0$. The only way for your general solution to meet that requirement is to set $c=Q_0$ as you already did.

7. May 24, 2010

### darryw

ok i think i got it.
so when init conditions, answer is :
Q = Q_0e^-(t/RC)

So if i solve as separable, i get this...

R dQ/dt + Q/C = 0 .....Q(0) = Q_0

dQ/dt = -Q/C

(1/Q)dQ = -(1/C)dt

then integrate both sides...

ln|Q| = -ln|C|+c

exponentiate both sides...

Q = -C + e^c

this last part looks wrong though.. ??
thanks

8. May 24, 2010

### Cyosis

Correct.

You forgot the R in your first step.

In the 4th step you have integrated over C, but C is a constant. You need to integrate with respect to t.

9. May 24, 2010

### darryw

R dQ/dt + Q/C = 0 .....Q(0) = Q
dQ/dt = -Q/RC

(1/Q)dQ = -(1/RC)dt

now integrate..

ln|Q| = -(t/RC)+c

exponentiate...

Q = e^(-(t/RC)+c)

but this is slightly different from the result i got with integ factor??

10. May 24, 2010

### Cyosis

No it is the same expression, because $e^c=constant$.