First order differential equation

Felipe Lincoln
Gold Member
Messages
99
Reaction score
11

Homework Statement


Solve the following differential equation such that ##x(0)=1##.
## \dfrac{dx}{dt} + 2tx = 3e^{-t^2}+t##

Homework Equations


Integrating factor:
##\mu(t) = exp\left(\int_0^t2t \right)##

The Attempt at a Solution


I used the integrating factor and then got the solution ##x(t) = 3te^{-t^2}+\dfrac{1}{2} + C ## and using the initial condition I got ##x(t) = 3te^{-t^2}+1 ## but if I replace this result into the differential equation I get 2t = t. I first tried to solve it again and got the same solution. Maybe the initial condition should be 1/2 ?
 
Physics news on Phys.org
Felipe Lincoln said:

Homework Statement


Solve the following differential equation such that ##x(0)=1##.
## \dfrac{dx}{dt} + 2tx = 3e^{-t^2}+t##

Homework Equations


Integrating factor:
##\mu(t) = exp\left(\int_0^t2t \right)##

The Attempt at a Solution


I used the integrating factor and then got the solution ##x(t) = 3te^{-t^2}+\dfrac{1}{2} + C ## and using the initial condition I got ##x(t) = 3te^{-t^2}+1 ## but if I replace this result into the differential equation I get 2t = t. I first tried to solve it again and got the same solution. Maybe the initial condition should be 1/2 ?

You'd better show us how you solved that because I don't get a simple additive constant ##C##. The ##C## should be multiplied by something related to the integrating factor.
 
I agree with Dick. Check that you treated the ##C## correctly at the step where you solved for ##x(t)##.
 
I agree with both of you, my ##C## isn't correct, but I do not think it would matter, if my solution was ##x(t) = 3te^{-t^2}+ C ## I would get the same result applying the initial conditions.
 
you made an algebraic mistake when you had to integrate exp ( t^2) ( 3 exp(-t^2) ) i.e integrate 3 dt to get 3t now do rest of the calculation
 
Felipe Lincoln said:
I agree with both of you, my ##C## isn't correct, but I do not think it would matter, if my solution was ##x(t) = 3te^{-t^2}+ C ## I would get the same result applying the initial conditions.
Actually, your ##C## is correct, but your solution is not. Your difficulty has nothing to do with the initial condition. Post your solution steps here and someone will show your mistake.
 
Felipe Lincoln said:

Homework Statement


Solve the following differential equation such that ##x(0)=1##.
## \dfrac{dx}{dt} + 2tx = 3e^{-t^2}+t##

Homework Equations


Integrating factor:
##\mu(t) = exp\left(\int_0^t2t \right)##

The Attempt at a Solution


I used the integrating factor and then got the solution ##x(t) = 3te^{-t^2}+\dfrac{1}{2} + C ## and using the initial condition I got ##x(t) = 3te^{-t^2}+1 ## but if I replace this result into the differential equation I get 2t = t. I first tried to solve it again and got the same solution. Maybe the initial condition should be 1/2 ?

It looks like you obtained the correct integrating factor ##\displaystyle \ \mu (t) =e^{t^2} ##, and did the integration correctly. At that point, you should have included a constant of integration, ##\ C\,.\ ## Also, at that point, you could have applied the boundary condition to evaluate ##\ C\,.\ ##

Alternatively, rather than evaluating ##\ C\ ## at that point, it seems that you then solved for ##\ x(t)\ ## by multiplying by ##\displaystyle \ e^{-t^2} \ (## or dividing by ##\displaystyle \ e^{t^2}\,).\ ## It seems that in doing this you forgot to also multiply (or divide) ##\ C\ ## by this factor.
 
Back
Top