# Solving differential equation of this type

av'+v=1
so p(x) =1 q(x)=1
in order to get a homogeneous solution

the solution takes this equation
v'+v=1
and throws away the parameter "a"

Cyosis
Homework Helper
Instead of looking at the solution right away what have you gotten so far? If you're totally stuck try to separate the variables.

ok ill try to go by the theory:
av'+v=1
q(x)=1
p(x)=1
$$t=\int p(x)dx=x$$
$$z=e^t$$
$$y=\frac{1}{z}[\int q(x)zdx+c]=\frac{1}{e^x}[xzd+c]$$
i get a different equation
??

Cyosis
Homework Helper
We have a differential equation that depends on the variable x. You somehow manage to add a variable t,z and d. I am not sure what you're doing. p(x) is the particular solution I take it and q(x) the homogeneous solution?

That means you've to solve $aq'(x)+q(x)=0$ first. Try to do that.

To find the particular solution you set the homogeneous equation equal to 1. It would be nice to get rid of the v' term, what kind of 'guess' function would do the trick?

this is the first time i see that kind of expression

and i dont have the expression that i saw in the solution

Cyosis
Homework Helper
What do you have? Can you solve the homogeneous equation?

It appears you want to do it the hard way by solving $v'(x)+\frac{1}{a}v=\frac{1}{a}$ with $P(x)=\frac{1}{a}, \; Q(x)=\frac{1}{a}$?

a*dq/dx=q
a*dq/q=1/dx

(i cant do integral on both sides)
dq and dx must be on the numenator
i cant get them bot there
??

dx
Homework Helper
Gold Member
You're over-complicating this problem. Just seperate variables:

a(dv/dx) + v = 1

a(dv/dx) = 1 - v

(a dv)/(1 - v) = dx

Cyosis
Homework Helper
If he's following a differential equation course he may not be allowed to just tear the derivative apart like that (for the time being). It is easy to guess the particular solution here though and the homogeneous equation is easily found by integrating.

If you have $a q'(x)+q(x)=0$ then $a q'(x)=-q(x)$ and $a q'(x)/q(x)=-1$. Try to integrate this expression by using a substitution u=q(x).

You're over-complicating this problem. Just seperate variables:

a(dv/dx) + v = 1

a(dv/dx) = 1 - v

(a dv)/(1 - v) = dx

you are correct
i get:
a*ln|1-v|=x

but its dont have the step where i throw away the parameter "a"
like they did in the proccess
??

Cyosis
Homework Helper
No you would get $-a \ln|1-v|$ and don't forget the integration constant. Secondly if the answer booklet throws the a away the answer booklet is simply wrong.

Edit: Hint plug the answer from your book into the differential equation and check if both sides match. Whenever you're working with differential equations it's very easy to check your answer and you should teach yourself to do so.

http://i40.tinypic.com/30lcmm0.gif

here is the full solution that i was presented
i cant see what is the continuity.
from the KCL eqaution i will get
v+cv'=1

i cant understand the disappearance of the parameter in the next line
it makes no sense
and this is a formal solution so it has to be correct

??

Cyosis
Homework Helper
A formal solution doesn't always have to be correct. And as I said you can check it by plugging it into the equation. Perhaps you should do that? Secondly they solve a different differential equation than you have. To solve it they used the method I suggested in post 9.

Also in the first equation there are two v_cs and one v. Is that supposed to be a v_c as well.

Oh before I forget plug THEIR answer into YOUR equation and see if the equation holds.

your 9th post doesnt explain the continuety part
and they dont use the "q" like you did

Cyosis
Homework Helper
So I use the variable q and they name it v. What is the big deal? And for the fourth time now have you plugged their answer into your equation? If you do you notice that their answer is not a solution to your differential equation for all a-s. This means there are two options, either the differential equation you listed is the wrong one or their answer is wrong. I also asked you

Also in the first equation there are two v_cs and one v. Is that supposed to be a v_c as well.

which you just ignored. I am guessing it isn't.

Last edited:
i cant understand where this solution starts
and where it ends

can you make steps?

Cyosis
Homework Helper
It is a bit hard when you don't cooperate. Which differential equation do you actually have to solve and I will ask again is v_c=v?

Mark44
Mentor
http://i40.tinypic.com/30lcmm0.gif

here is the full solution that i was presented
i cant see what is the continuity.
from the KCL eqaution i will get
v+cv'=1

i cant understand the disappearance of the parameter in the next line
it makes no sense
and this is a formal solution so it has to be correct

??
Correct - the parameter should not disappear as it seems to have done in the next line. This is either a mistake that your instructor made or that you made when you were taking notes. On the other hand, where does c come from? I don't see anything in your drawing that shows this. Isn't this the capacitance, which you show as 4 F.?

So it appears that the problem is:
cv' + v = 1

From your notes, it appears that your initial condition is v(0) = 4. Shouldn't this be 2 volts? That's the voltage from the battery or power supply. The part about continuity is that the voltage across the capacitor has to be the same just before t = 0 as just after t = 0, which is the same as it must be right at t = 0.

Now, put the solution you have somewhere that you can't see it. In fact, throw it away! We don't need it any more. Stop telling us about it.

You need to do two things:
1. Solve the homogeneous equation: cv' + v = 0, or maybe it is 4v' + v = 0. Cyosis and dx have given you at least a couple of ways to do this. Your solution to the homogeneous equation, vh will be Ae-t/c or maybe Ae-t/4, if c is as I think it is. From your initial condition you can solve for A.
2. Find a particular (not private) solution to the nonhomogeneous equation. I would try vp = K, and substitute this into the equation cv' + v = 1 (or maybe 4v' + v = 1), to see what K needs to be.
Your general solution (not formal solution) will be the homogeneous solution vh plus the particular solution, vp.

You can check that it actually is a solution by substituting it back into your differential equation cv' + v = 1 (or maybe it's 4v' + v = 1). It should also be true that v(0) = 4 (or whatever it's supposed to be, as I mentioned above.

If your solution satisfies the DE and the initial condition, then that's the solution. If the one that you threw away is different in any appreciable way, then it is not the solution.

4(dv/dx) + v = 1

4(dv/dx) = 1 - v

(4 dv)/(1 - v) = dx
-4ln(1-v)=x
e^x=(1-v)^(-4)
v(0) => 1=(1-v)^(-4)
1=1/((1-v)^(4))
(1-v)^(4)=1
v=1
i dont get this kind of expression
$$Ae^{-t/4}$$
??

Cyosis
Homework Helper
transgalactica said:
4(dv/dx) + v = 1

4(dv/dx) = 1 - v

(4 dv)/(1 - v) = dx
-4ln(1-v)=x
e^x=(1-v)^(-4)

Almost correct, you forgot the integration constant.

transgalactic said:
v(0) => 1=(1-v)^(-4)
1=1/((1-v)^(4))
(1-v)^(4)=1
v=1

Wrong.

How can v possibly remain in the equation when you're calculating v(0)?
First think clearly what you want to solve. You want to find an expression for v(x). Therefore solve for v(x) first. After you have done that correctly you can use v(0)=4 (or whatever since this still isn't clear) to find the integration constant.

what do i do after this step
-4ln(1-v)=x+c

??

Cyosis
Homework Helper
Easiest way is to divide by -4 on both sides.

$$ln(1-v)=\frac{x+c}{-4}$$
$$1-v=e^{\frac{x+c}{-4}}$$
==
$$v=-e^{\frac{x+c}{-4}}+1$$
what now
??

Cyosis
Homework Helper
No, that is not right there is already a -4 on the LHS. After you've divided both sides correctly by -4 you can exponentiate and solve for v.

Cyosis
Homework Helper
Do you know what you're trying to solve? For which function are you trying to solve this differential equation? It is for that function you need to solve.

Edit: Seeing as you're constantly editing your original question in its current shape you now have to use the boundary condition to find the value of the integration constant.

i know i made a mistake
i fixed it
$$ln(1-v)=\frac{x+c}{-4}$$
$$1-v=e^{\frac{x+c}{-4}}$$
==
$$v=-e^{\frac{x+c}{-4}}+1$$
what now
??

Cyosis
Homework Helper
Use the boundary condition to find the value of the integration constant.

even if i will find the C
i will not have the homogeneous solution like in the solution
Be^ ....

??

Cyosis
Homework Helper
Please did you even read Mark's post? How many people will have to tell you that the solution as presented in the screenshot is complete rubbish. How often do I have to ask you to just plug the solution given by the answer model into your differential equation? This is the fifth time now. You will see that it will fail to be a solution thus it must be wrong.

To make it worse we still haven't been told what the voltage of the source is whether or not v and v_c are different variables etc etc.

Calculate c and see that it will give the correct solution.

And read Mark's post again he tells you clearly what all the ambiguities are with the problem you've provided us.