# Thread: Solution for differential equation

1. ## Solution for differential equation

Why is the solution for this equation: $\displaystyle \frac{d^2V_x}{dt^2} + (\frac{qB}{m})^2 V_x = 0$

equal to $\displaystyle V_x(t) = Asin(\omega t) + Bcos(\omega t)$?

And can we solve this analytically? Thank you.

2. ## Re: Solution for differential equation

That is a "linear homogeneous equation with constant coefficients". The "standard" method of solution is to "try" a solution of the form $\displaystyle Vx= e^{at}$. Then $\displaystyle \frac{dV_x}{dt}= ae^{at}$ and $\displaystyle \frac{d^2V_x}{dt^2}= a^2e^at$. Putting that into the equation, we have $\displaystyle a^2e^{at}+ \left(\frac{qB}{m}\right)^2e^{at}$$\displaystyle = e^at\left[a^2+ \left(\frac{qB}{m}\right)^2\right]= 0$. Since $\displaystyle e^{at}$ is never 0, we must have $\displaystyle a^2+ \left(\frac{qB}{m}\right)^2= 0$ or $\displaystyle a^2= -\left(\frac{qB}{m}\right)^2$ so $\displaystyle a= \pm\frac{qB}{m}i$.

So the general solution is $\displaystyle V_x= C_1e^{\frac{qb}{m}it}+ C_2e^{-\frac{qb}{m}it}$.

But since this problem involves purely real data, we don't like having a solution with the imaginary unit, i, in it. What must happen is any "imaginary part" cancels. We can show that clearly by using the fact that $\displaystyle e^{ix}= cos(x)+ i sin(x)$ which can be proved by comparing the Taylor series expansions of the three functions. So we can write $\displaystyle C_1e^{ix}+ C_2e^{-ix}= C_1(cos(x)+ isin(x))+ C_2(cos(x)- isin(x))= (C_1+ C_2)cos(x)+ (C_1- C_2)sin(x)= A cos(x)+ B sin(x)$ where $\displaystyle A= C_1+ C_2$ and $\displaystyle B= C_1- C_2$. Since $\displaystyle C_1$ and $\displaystyle C_2$ can be any arbitrary constants so can A and B.

(I have use here the facts that cos(x) is an even function and sin(x) is an odd function: cos(-x)= cos(x) and sin(-x)= -sin(x).)

3. ## Re: Solution for differential equation

Thanks,

but I don't know where did an imaginary unit $\displaystyle i$ went here:

$\displaystyle C_1e^{ix}+ C_2e^{-ix}= C_1(cos(x)+ isin(x))+ C_2(cos(x)- isin(x))= (C_1+ C_2)cos(x)+ (C_1- C_2)sin(x)$?

4. ## Re: Solution for differential equation

Originally Posted by Nforce
Thanks,

but I don't know where did an imaginary unit $\displaystyle i$ went here:

$\displaystyle C_1e^{ix}+ C_2e^{-ix}= C_1(cos(x)+ isin(x))+ C_2(cos(x)- isin(x))= (C_1+ C_2)cos(x)+ (C_1- C_2)sin(x)$?
"i" did not go anywhere- that is wrong and is NOT what I wrote! What is correct is that $\displaystyle C_1e^{ix}+ C_2e^{-ix}= C_1(cos(x)+ isin(x))+ C_2(cos(ix)- isin(x)= (C_1+ C_2)cos(x)+ (iC_1- iC_2)sin(x)= Acos(x)+ Bsin(x)$ where $\displaystyle A= C_1+ C_2$ and $\displaystyle B= iC_1- iC_2$. In the case that all of the data is real, [tex]C_1[tex] and $\displaystyle C_2$ will be *complex conjugates* so that $\displaystyle C_1+ C_2$ is real and $\displaystyle C_1- C_2$ is pure imaginary.

5. ## Re: Solution for differential equation

Oh, ok, thanks.