Monday, August 27, 2012

Solving Second-Order Linear Homogeneous Constant Coefficient Ordinary Differential Equations

If that title seems like a mouthful, it's because our studies so far have taught us how to solve just one very specific kind of ordinary differential equation (ODE). If you're unsure of how to determine if your equation fits the bill, check out my last post on classifying ODEs. To put it shortly, your equation should take the form ay'' + by' + cy = 0, where a, b, c are constants.

To start, find the characteristic polynomial. This is just aα2 + bα + c = 0. Your professor may have used r instead of alpha. Now, solve for α using the quadratic formula, α = (-b ± √(b2 - 4ac))/(2a). An astute reader might notice at this point that our problem branches off into three possible situations.

First possibility is that b2 - 4ac > 0. If this occurs, the term under the radical is positive, and you receive 2 real solutions for α, we'll call them α1 and α2. Your solution to the ODE will then take the form y(x) = c1eα1x + c2eα2x.

The second situation is that b2 - 4ac = 0. In this case, the ± term in your quadratic equation vanishes, and you therefore get just one root, which we'll call α. Your general solution will now take the form y(x) = c1eαx + c2xeαx.

Finally, you might run into the situation that b2 - 4ac < 0, which means that the equation has imaginary roots equal to -b/(2a) ± i√(4ac - b2)/(2a). An imaginary number has two distinct parts, the real part and the imaginary part, written in the form β+iγ (i is √-1). In this case,  β = -b/(2a), and γ = √(4ac - b2)/(2a). And the general solution takes the form y(x) = c1eβxcos(γx)+ c2eβxsin(γx).

c1 and c2 represent any constant, and these cannot be found specifically without being given initial conditions - that is, a value for y(0) and y'(0). If you are given initial conditions, you must take some additional steps to determine c1 and c2. Plug in 0 for x and set the resulting expression equal to y(0). This will give you one equation involving c1 and c2. Then differentiate y(x), plug in 0 for x, and set the resulting expression equal to y'(0). You will then have a system of two equations involving c1 and c2. Use your choice of methods (substitution or elimination) to find c1 and c2.

These are just the answers! Your professor may want you to show many more steps than what I have shown here. And as always, if you have any questions, come to MASH. And if there's anything specific that you'd like to see on the blog, leave a comment. You don't need to have a blogspot account to comment.

Happy calculating,
Rachel

Sunday, August 26, 2012

Classifying Ordinary Differential Equations

Ordinary differential equations (ODEs) have several basic properties that you must be aware of.

One of the first important ones is its order. The order of an ODE is simply equal to the highest order derivative found in the equation. So, for example, the equation

y''' + 2y'' - 6xy' + x2y + y4 = sin(x)

is a third order equation, because y''' is a third order derivative, and is the highest order derivative found in the equation. Please note the important difference between terms such as y''' and y4; the latter is not a derivative and so is not considered when determining order of an ODE.

A second very important characteristic of an ODE is linearity. An ODE is linear if none of the y terms have exponents or involve any other "fancy" functions (like cos(y), or ey). Squared x's are okay, but squared y's, if present, mean the equation is nonlinear. So, the equation

y''' + 2y'' - 6xy' + x2y + y4 = sin(x)

is nonlinear, because of the y4. But the equation

y'' -  x2y' + exy = sin(x)

is linear because the only y terms are y derivatives and y itself.

A linear equation is always capable of being arranged into the following form:

a1(x)y + a2(x)y' + a3(x)y'' + ... = f(x)

That's kind of icky to look at, so let me break it down. Each term on the left contains y or a y derivative. an(x) are just the coefficients of each term. Note that these coefficients can be functions of x, but they can also just be constants, or even 0. There can be any number of terms, with increasing orders of derivatives, and all these terms are summed. Any terms that do not contain a y or a y derivative are written on the righthand side, which here is represented as f(x). f(x) is called the forcing function, and it can be a function of x, a constant, or 0.

This leads me to the last two properties. These last properties ONLY apply to linear ODEs. If your ODE is nonlinear, it cannot be classified any more specifically. If it is linear, further analysis must be done.

I said above that the coefficients an(x) can be functions of x or constants. This is another one of the properties. If ALL coefficients are constant, a linear ODE can be further classified as a constant coefficient ODE. If even one coefficient contains an x, the ODE is said to have variable coefficients. So the equation

y'' + 6y' - 11y = sin(x)

has constant coefficients, and the equation

y'' + 3xy' - 7y = 0

has variable coefficients.

Finally, like I mentioned before, the function f(x) on the righthand side of the generic linear equation listed above can be a function of x, a constant, or 0. If it is zero, the equation is said to be homogeneous. If it's not zero, the equation is nonhomogeneous. Another way to think about this is, if there is a term anywhere in the equation that does not contain y or a derivative of y, the equation is nonhomogeneous. So the equation

y'' + 5xy' + y = 7

is nonhomogeneous, while

y'' + sin(x)y = 0

is homogeneous.

So, quiz yourself: is the following equation homogeneous?

y'' + 7x2y' + y2 = 0

Trick question! That equation isn't linear, so it cannot even be classified as homogeneous or nonhomogeneous. Those categories only apply to linear equations.

Okay, here's a real question. Is the following equation homogeneous?

y'' + (8/x)y' + √(x)y + 7 = 0

The answer is... no! Did I fool you? Don't get lazy and just look for a zero on the right side of the equation. There is a term (7) that does not contain y or a derivative of y, so the equation is inhomogeneous. This equation isn't shown in the standard form of a linear equation. If it were, that 7 would have been subtracted over to the righthand side, and this equation wouldn't be so deceptive.

One final question, to provide an overview of everything in this post. No tricks in this one, I promise. Tell the order of the following equation, whether it is linear or nonlinear, and, if applicable, whether it has constant/variable coefficients and is homogeneous/nonhomogeneous.

y''' + 2xy'' sin(x)y = 1/x

The answers are (highlight to read): third order, linear, variable coefficients, and nonhomogeneous.

As always, come to MASH if you want more help!

Happy calculating,
Rachel

Wednesday, August 22, 2012

Precalculus Toolkit

I thought I'd start by compiling a list of some of the useful algebraic and trigonometric rules that come up while solving differential equations. Many times, when students get stuck on a problem, it's not because they were unable to do the calculus. It's because they had trouble with the algebraic acrobatics that is sometimes necessary to get an answer into the proper form.

Sometimes, performing an operation on one representation of an equation would be very difficult or impossible using the methods you learn in this class. However, if you represent the equation in a different, equivalent way, the task might become much easier.

The list below is meant to refresh you on some of these methods, so that you won't spend hours beating your head against the wall to solve a problem that should be able to be solved easily. Also keep in mind that you might have to use the rules backwards, too!

Exponents:
  1. Multiplying same base, different exponent: add the exponents
    (xu)(xv) = xu+v
    Example: (x4y)(xy+6) = x4y + y +6 = x5y + 6

  2. Multiplying different base, same exponent: multiply the bases
    (xu)(yu) = (xy)u
    Example: (x3z+4)(y3z+4) = (xy)3z+4
     
    Please note that this rule DOES NOT apply if you are not multiplying! You cannot "distribute" an exponent over addition.

  3. Raising an exponent to an exponent: multiply the exponents
    (xu)v = xu*v
    Example:  (x3z+4)2 = x(3z+4)(2) = x6z+8

  4. The Nth root is the same as having an exponent of 1/N
    n√(u) = u1/n
    Example: √(x+1) = (x+1)1/2
Logarithms: 
  1. Log of a product: add the log of each factor
    ln(u*v) = ln(u) + ln(v)
    Example: ln((x+1)(x-3)) = ln(x+1) + ln(x-3)
     
  2. Log of a quotient: subtract the log of the denominator from the log of the numerator
    ln(u/v) = ln(u) - ln(v)
    Example: ln((x+1)/(x-3)) = ln(x+1) - ln(x-3)
     
  3. Log of an exponential: bring the exponent out front
    ln(uv)  =  u*ln(v)
    Example: ln((x+4)x/5) = x/5*ln(x+4) 
Trigonometry:
  1. Trig identities equal to 1
    sin2(u) + cos2(u) = 1
    sec2(u) - tan2(u) = 1
    csc2(u) - cot2(u) = 1
    Example:  sin2(2x + 3) + cos2(2x + 3) = 1
     
  2. Multiple angle and power reduction trig formulas
    There are way too many to list here, but Wikipedia has a great table. These are to be used when you don't know what to do with that sin(2x) or sin3(x), and other similar situations.
Feel free to leave a comment if you think of more I should have included. You don't need to have a blogspot account to leave a comment. And as always, feel free to stop by the ARC in the lobby of Daniel's hall during my sessions to get help in person, or to email me at rachel.wigell (at) wpi (dot) edu.

Happy calculating,
Rachel

Introduction

Hi! I'm Rachel Wigell, and I'm the MASH leader for MA2051, Ordinary Differential Equations. I hold MASH sessions on Tuesdays at 11AM, Wednesdays at 10AM, and Wednesdays at 5PM. The evening sessions will be in the Exam Proctoring Center, and the others will be in the Academic Resource Center (ARC), both located in the lobby of Daniel Hall.

My purpose in keeping this blog is to provide examples of how to do the kinds of problems you will encounter in MA2051 in a format that is accessible to you 100% of the time. I'd love to see you in my sessions, and you can also email me any time (rachel.wigell (at) wpi (dot) edu) and I will get back to you ASAP, but the blog is always here when you need it.

I will try to post at least one example problem for each major topic you study. I aim to choose problems that cover as many of the situations you might run into as possible. If you have a suggestion as to something I should post, feel free to leave a comment on the blog (you don't have to have a blogspot account to leave comments) or email me.

I will not work out assigned problems on the blog. If you need help with a specific homework problem, I can either show a similar problem on the blog, or work with you in person on the homework problem (I will point you in the right direction, but I will not do any problems for you).

Hope you find this a useful resource for the coming term!

Happy calculating,
Rachel