Angular Frequency of a charged particle moving in a Magnetic Field I am trying to solve the Differential Equation in Mathematica but it is giving me error. How to find it's solution in Mathematica or in general.
$$y'''=\frac{\omega^2E}{B}-\omega^2y'$$
The above equation is for the angular frequency of a charged particle moving inside a magnetic field.
 A: Though this question is perhaps better suited to the Mathematica Stack Exchange, I think this differential equation is simple enough to be able to solve such equations by hand before resorting to tools like Mathematica! The key thing that you need to notice in the above equation that makes it very simple to solve is that $y$ appears nowhere in the equation. As a result, you could do the simple substitution: $$y' = u.$$
Using this, the equation becomes: $$u'' + \omega^2 u = \omega^2 \frac{E}{B}.$$
Such an equation is known as a non-homogeneous second-order linear differential equation with constant coefficients, and there are many ways to solve it. You can learn about them here and here.
The adjective "non-homogeneous" means that there is a non-zero term on the right hand size of the equation above which makes solving the equation a little non-trivial. However, there is a well known theorem that the general solution to such a non-homogeneous linear differential equation can be written as a sum of two terms, $u_p$ and $u_h$: $$u(t) = u_h(t) + u_p(t),$$ where $u_h$ is the general solution to the homogeneous part, i.e.: $$u_h'' + \omega^2 u_h = 0,$$
and $u_p$ is a "particular" solution, one that you may arrive at using guess-work, which "takes care" of the term in the RHS.
Now, from the form of the differential equation for $u_h$, it's clearly the harmonic oscillator equation and so the solution is clearly just: $$u_h = A \cos{\omega t} + B \sin{\omega t}.$$
However, what about $u_p$? You need to guess a function $u_p$ that satisfies $$u_p'' + \omega^2 u_p = \omega^2 \frac{E}{B},$$
and some inspection should tell you that if $u_p = \frac{E}{B}$, then the equation is trivially satisfied! (i.e., the solution $u_p = \text{constant}$ is a solution to the problem, though clearly not the most general one!)
The general solution is thus: $$u(t) = A \cos{\omega t} + B \sin{\omega t} + \frac{E}{B},$$
and to find $y(t)$ all you need to do is trivially integrate the above equation. The general solution is obtained by putting in initial conditions, which will fix the values of $A$ and $B$.
