# Higher order differential equation

1. Aug 25, 2015

### Raghav Gupta

Solve
y'' - 2y' + 2y = $e^x tanx$
What concept should we use if we know only solving first order differential equation?

2. Aug 25, 2015

### MisterX

3. Aug 25, 2015

### DEvens

If you know how to solve a first order equation, can you solve two coupled first order equations?

Let $v = y'$. Then convert your equation to this.

$v' - 2v + 2y = e^x \tan x$

Now you have two coupled first order equations.

4. Aug 25, 2015

### RUber

$( \frac {d}{dx} - I ) ^2 y = e^x \tan x$
What sorts of functions solve the homogeneous problem?
$( \frac {d}{dx} - I ) ^2 y = 0$
Or...
Imagine that $y = f(x) e^x$ and take the derivatives. What do you find out about f(x)?

5. Aug 25, 2015

### pasmith

Unfortunately $\lambda^2 - 2\lambda + 2 = (\lambda - 1)^2 +1$ does not factorise over the reals (which isn't really a problem but not ideal for someone not familiar with second-order linear differential operators with constant coefficients).

That said, I would set $y(x) = f(x)e^{kx}$ and choose $k$ to eliminate the $f$ term. This eventually yields a first-order ODE for $f'$, and most of the resulting integrals can be done analytically.

Last edited: Aug 25, 2015
6. Aug 25, 2015

### RUber

Thanks pasmith. Good catch.

7. Aug 30, 2015

### epenguin

Can you tell us where this problem comes from?
Doesn't even to solve y''= tan x require special functions that would not be considered elementary as you are essentially requiring?
Unless there is something special about your equation allowing some clever way round. (I cannot see that #4 is it.)

Last edited: Aug 30, 2015
8. Aug 31, 2015

### HallsofIvy

If all you know is "solving first order equations" then you can't solve this equation. It simply cannot be reduced to a first order equation! There is a reason for learning how to solve higher order equations!

9. Sep 5, 2015

### Raghav Gupta

Read and understood the concept of second order linear non-homogeneous differential equation.
Here we have to find first the complementary function and then the particular integral
y=yc+yp
So we have the characteristic or auxiliary equation first as m2-2m+2=0
I know solving complementary function
m=1± i
yc=ex(cosx+sinx)
Now for yp I know the method of undetermined coefficients.
For ex we can simply substitute y= Aex but here the R.H.S is f(x)ex.
What to do?

10. Sep 6, 2015

### epenguin

OK so you now know it seems some of the method for non-homogeneous (constant coefficient) linear d.e's. and have solved for the complementary function.

In the most widely needed applications of these x is time, and the RHS, called the 'forcing function', is commonly sine/cosine, or several such, or exponential or combination. These are daily bread of electrical or radio engineers etc. There are some widely taught methods quite adequate for dealing with this kind of function, which work because these functions have nice properties, namely that all their derivatives are also sin/cosine/exponential.

The function you're given, with tan, unfortunately does not have quite such nice properties, so you are trying to run before you can walk. (A very good thing IMO! ). It is also rather unphysical if x is time, as it is periodic but going to infinity in finite time (x).

I think I can make one of the cobbling methods work for this. Maybe I wil come back on this. However you do not want to waste time on methods that are hard to puzzle out so I think you can actually use the variation of parameters method you mentioned. In Dr. Paul's Online Math Notes you can find not only a back-up explanation of the method but a worked example that is almost the same as your problem.

The second sentence of my #7 was a misconception btw.

11. Sep 6, 2015

### HallsofIvy

The "basic" solution for a linear, homogeneous, differential equation with constant coefficients is of the form $e^{\alpha x}$ where $\alpha$ is a solution to the associated characteristic equation. From that we also get sine and cosine solutions (if $\alpha$ is complex) and powers of x (if $\alpha$ is a multiple root). The method of "undetermined coefficients" only works if the right hand side of a non-homogeneous equation is one of those types of function.

What you need to use here is called "variation of parameters", that MisterX mentioned before. If u(x) and v(x) are two independent solutions to the homogeneous equation, then a general solution is of the form "Cu(x)+ Dv(x)" where C and D are constants. Those are the "parameters" we are going to vary. Look for solutions of the form p(x)u(x)+ q(x)v(x), with p and q functions of x. With y(x)= p(x)u(x)+ q(x)v(x), y'= p'u+ pu'+ q'v+ qv'. Because there are an infinite number of possible solutions, there are an infinite number of possible "p" and "q". We "narrow the search", and simplify the problem, by searching for solutions such that p'u+ q'v= 0. That leaves y'= pu'+qv' and the second derivative is y''= p'u'+ pu''+ q'v'+ qv''. Now, put those y, y', and y'' into the differential equation.

Because u and v satisfy the homogeneous equation, all terms involving only p and q (without being differentiated) will cancel. Since we required that p'u+ q'v= 0 there were be no p'' or q''. That is, we will have an equation involving only p' and q'. That, together with p'u+ q'v= 0, give us two equations to solve, algebraically, for p' and q'.