Friday, August 30, 2013

BA-20 Profit Manager

Greetings from Friends Cafè. In Monrovia, CA! My favorite place to hang out on Friday nights.

I doubt we see these in office stores anymore: the Texas Instruments BA-20 Profit Manager. I purchased this while visiting the Claremont Colleges Bookstore, after another visit to the Honnold/Mudd Library.

In what otherwise would be a desktop calculator, the BA-20 features Cost-Sell-Margin. To get around the need for a "compute" key that TI's flagship business calculator, BA-II Plus, the BA-20 has three dedicated columns of two keys: two keys for entering known values, the third is calculated for automatically.

Until next time, got to get to eating!

Eddie



This blog is property of Edward Shore. 2013

Wednesday, August 28, 2013

Greetings from San Diego - Calculator Poll Question (Back to School)

Greetings from San Diego, am on vacation until Labor Day. Specially I am at a Starbucks stop on my way to Encinitas Beach, enjoying a Chai Blended Latte.

I just came from the Giesel Library at the University of California, San Diego. It took me forever to find it; along with the correct parking lot. The library is named after Theodore Seuss Giesel, better known as Dr. Seuss. Naturally, I managed to buy a Dr. Seuss book - my cousin's daughter is going to enjoy it, I'm sure.

Updates

There is going to be Part 8 of the Differential Equation series, maybe more. I found an interesting way, maybe easier than Laplace Transforms or eigenvalues (the former I covered) to solve systems of differential equations. I am also aiming to do a blog on the Runge Kutta algorithm.

Back To School...For a Lot of Us

School is either right around the corner or even here for a lot of students. Got to ask the math students: what calculator (or calculators) are you using? (And why?). Even if you are not a student, feel free to answer in the comments


Well, it's on to the beach for sunshine and sunset, and probably dinner. Have a great day everyone!


Eddie

This blog is property of Edward Shore. 2013

Thursday, August 22, 2013

Does √(3*x + 1) = -2 has a solution?


Solve for x:

√(3*x + 1) = -2

One could approach then problem algebraically:

(1) Square both sides.
(3*x + 1) = (-2)^2 = 4

(2) Subtract 1 from both sides and then divide by 3.
3*x + 1 = 4
3*x = 3
x = 1

That could be perfectly reasonable. After all, 3*1 + 1 = 4 and 4 = -2 * -2 = 2 * 2.

However, use any calculator or mathematical software with solving capability, attempting to solve √(3*x + 1) = -2 will yield "No Solution".

Why is that?

In practice, when we take square roots of numbers, we take the positive root, which is practical for majority of applications. The positive root is referred to the principal square root. That is what you get when you use the square root function on your calculator or mathematics software.

Below are two graphs, used by the TI-nSpire App:
1. The principal square root function y = √x, plotted in red.
2. Solutions to the equation x^2 = y, allowing both roots. This is shown by the parametric equation, x = t^2, y = t, plotted in blue.

So keep in mind, when dealing with roots with a calculator or software, you are dealing with the principal root. (If possible, real, then positive).

Source: Dr. Math - Square Root Function

Until next time, have a great weekend!

Eddie

This blog is property of Edward Shore. 2013

Monday, August 19, 2013

Differential Equations #7: Laplace Transforms and Systems of Differential Equations

In this blog we will look at how Laplace transforms assist us in solving systems of differential equations.

In the examples tonight, I have design the y(x) and z(x) as the equations to solve for, and designate:

L(y) = F(s) (which I will shorten to F)
L(y') = s*F - y(0)

L(z) = G(s) (which I will shorten to G)
L(z') = s*G - z(0)


As a reference:
L( f(t) ) → F(s)
1 → 1/s
t^n → n!/(s^(n+1))
e^(a*t) → 1/(s-a)
sin(a*t) → a/(s^2 + a^2)
t*sin(a*t) → (2*a*s)/((s^2 + a^2)^2)
cos(a*t) → s/(s^2 + a^2)
t*cos(a*t) → (s^2 - a^2)/((s^2 + a^2)^2)
sinh(a*t) → a/(s^2-a^2)
cosh(a*t) → s/(s^2-a^2)
e^(a*t)*sin(b*t) → b/((s-a)^2 + b^2)
e^(a*t)*cos(b*t) → (s-a)/((s-a)^2 + b^2)
e^(a*t)*sinh(b*t) → b/((s-a)^2 - b^2)
e^(a*t)*cosh(b*t) → (s-a)/((s-a)^2 - b^2)


For this, it would be best to show how to solve systems by example.

Examples:

1. y' = 2*y + z
z' = -2y
Initial Conditions: y(0)=1, z(0)=-1


Using the transforms above, the result is:
s*F - 1 = 2*F + G
s*G + 1 = -2*F

-1 = (2-s)*F + G
1 = -2*F - s*G

Solving for F and G:

F = (s-1)/(s^2 - 2*s + 2)
G = (-s)/(s^2 - 2*s + 2)

Taking inverse Laplace Transforms for both F and G:

F = (s-1)/(s^2 - 2*s + 2)
F = (s-1)/(s^2 - 2*s + 1 + 1)
F = (s-1)/((s-1)^2 + 1)
L⁻¹(F) = y = e^x * cos x

G = (-s)/(s^2 - 2*s + 2)
G = (-s)/((s - 1)^2 + 1)
G = (-s - 1 + 1)/((s-1)^2 + 1)
G = -(s - 1)/((s-1)^2 + 1) - 1/((s-1)^2 + 1)
L⁻¹(G) = z = -e^-x * cos x - e^x * sin x

y = e^x * cos x
z = -e^-x * cos x - e^x * sin x

2. y' + z = x
z' + 4*y = 0
Initial Conditions: y(0)=1, z(0)=-1


L(x) = 1/s^2

Then:
s*F - 1 + G = 1/s^2
s*G + 1 + 4*F = 0

s*F + G = 1/s^2 + 1
4 * F + s*G = -1

F = (s^2 + s + 1)/(s^3 - 4*s)
G = (-s^3 - 4*s^2 - 4)/(s^4 - 4*s^2)

Finding y and z:

F = (s^2 + s + 1)/(s^3 - 4*s)
F = -1/4 * 1/s + 3/8 * 1/(s+2) + 7/8 * 1/(s-2)
L⁻¹(F) = y = -1/4 + 3/8 * e^(-2x) + 7/8 * e^(2x)

G = (-s^3 - 4*s^2 - 4)/(s^4 - 4*s^2)
G = 1/s^2 + 3/4 * 1/(s + 2) - 7/4 * 1/(s-2)
L⁻¹(G) = z = x + 3/4 * e^(-2*x) - 7/4 * e^(2*x)

y = -1/4 + 3/8 * e^(-2x) + 7/8 * e^(2x)
z = x + 3/4 * e^(-2*x) - 7/4 * e^(2*x)

3. y' + z' = 3
y - z = x
Initial Conditions: y(0) = 1, z(0) = 0


s*F - 1 + s*G = 3/s
F - G = 1/s^2

F = (s + 4)/(2*s^2)
F = s/(2*s^2) + 4/(2*s^2)
F = 1/(2*s) + 2/(s^2)
L⁻¹(F) = y = 1/2 + 2*x

G = (s + 2)/(2*s^2)
G = s/(2*s^2) + 2/(2*s^2)
G = 1/(2*s) + 1/(s^2)
L⁻¹(G) = z = 1/2 + x

y = 1/2 + 2*x
z = 1/2 + x

This concludes our section for Differential Equations. Hope this is helpful and thanks as always! Eddie

Update: There will be more of the Differential Equations series! Look for additional posts during September 2013. Eddie - 8/30/13

This blog is property of Edward Shore. 2013



Differential Equations #6: Laplace Transforms and Solving Differential Equations

In the last post, Differential Equations #5: An intro to Laplace Transforms, we introduced the concept of taking Laplace transforms and inverse Laplace transforms.

Two Laplace transforms we need to take note of:


L( f'(t) ) = s * F(s) - f(0)
L( f"(t) ) = s^2 * F(s) - s * f(0) - f'(0)


The presence of f(0) and f'(0) indicates that can use appropriate conditions to solve the differential equation.

To solve the differential equation using Laplace transformation:

1. Perform a Laplace transform on each term. Remember that
L(y(x)) = F(s)
L(y'(x)) = s*F(s) - y(0)
L(y"(x)) = s^2*F(s) - s*y(0) - y'(0)

2. Solve for F(s). If necessary, use algebraic manipulation to get F(s) in a working form.

3. Find the inverse Laplace transform for F(s). The final solution is:
y(x) = L⁻¹(F(s))


As a reference:
L( f(t) ) → F(s)
1 → 1/s
t^n → n!/(s^(n+1))
e^(a*t) → 1/(s-a)
sin(a*t) → a/(s^2 + a^2)
t*sin(a*t) → (2*a*s)/((s^2 + a^2)^2)
cos(a*t) → s/(s^2 + a^2)
t*cos(a*t) → (s^2 - a^2)/((s^2 + a^2)^2)
sinh(a*t) → a/(s^2-a^2)
cosh(a*t) → s/(s^2-a^2)
e^(a*t)*sin(b*t) → b/((s-a)^2 + b^2)
e^(a*t)*cos(b*t) → (s-a)/((s-a)^2 + b^2)
e^(a*t)*sinh(b*t) → b/((s-a)^2 - b^2)
e^(a*t)*cosh(b*t) → (s-a)/((s-a)^2 - b^2)


Examples:

In our examples, I am going to shorten F(s) to F.

1. y' + 2*y = e^x, y(0) = 3

L(y') = s*F - y(0) = s*F - 3
L(2*y) = 2*F
L(e^x) = 1/(s-1)

Then:
s*F - 3 + 2*F = 1/(s-1)

Solving for F yields:
F = 1/((s-1)*(s+3)) + 3/(s+3)
= (3*s - 2)/((s-1)*(s+3))
= (1/3)/(s-1) + (8/3)/(s+3) (by partial decomposition of fractions)

Then y = L⁻¹(F)
= L⁻¹(1/3)/(s-1) + (8/3)/(s+3))
= 1/3*L⁻¹(1/(s-1)) + 8/3*L⁻¹(1/(s+3))
= 1/3 * e^-x + 8/3 * e^(2*x)

Final answer y(x) = 1/3 * e^-x + 8/3 * e^(2*x)

2. y" - y' = e^x, y(0)=1, y'(0) = 0

L(y") = s^2*F - s*y(0) - y'(0) = s^2*F - s
L(-y) = -L(y) = -(s*F - y(0)) = -s*F + 1
L(e^x) = 1/(s-1)

Then:
s^2*F - s - s*F + 1 = 1/(s-1)
F*(s^2 - s) = 1/(s-1) + s - 1
F = 1/((s-1)*(s^2 - s) + (s-1)/(s^2 - s)
F = 1/(s^3 - 2*s^2 + s) + (s-1)/(s^3 - 2*s^2 + s)

Since s^3 - 2*s^2 + s = s * (s^2 - 2*s + 1) = s * (s - 1)^2,

F = 1/(s * (s-1)^2) + 1/s
F = (1 + s^2 - 2*s + 1)/(s * (s-1)^2)
F = (s^2 - 2*s + 2)/(s * (s-1)^2)

By partial decomposition of fractions:
F = 2/s - 1/(s-1) + 1/(s-1)^2

By inverse Laplace transform:
L⁻¹(F) = y = 2 - e^x + x*e^x

3. y' + y = sin x, y(0) = π/2

L(y') = s*F - π/2
L(y) = s*F
L(sin x) = 1/(s^2 + 1)

(s*F - π/2) + F = 1/(s^2 + 1)
(s + 1) * F = 1/(s^2 + 1) + π/2
F = 1/((s^2 + 1)*(s + 1)) + π/(2*(s+1))

Simplification and partial decomposition of fractions:
F = 1/2 * 1/(s+1) - 1/2 * (s-1)/(s^2 +1) + π/2 * 1/(s+1)
F = (1/2 + π/2) * 1/(s+1) - 1/2 * 1/(s^2 + 1) + 1/2 * 1/(s^2 + 1)

L⁻¹(F) =
(1/2 + π/2)*e^-x - 1/2 * cos x + 1/2 * sin x

4. y' + 2*y = x^2

L(y') = s*F - 2
L(2*y) = 2*F
L(x^2) = 2/s^3

s*F - 2 + 2*F = 2/s^3
(s + 2) * F = 2/s^3 + 2
F = (2 + 2*s^3)/(s^3 * (s + 2))
F = 1/s^3 - 1/2 * 1/s^2 + 1/4 * 1/s + 7/4 * 1/(s+2)

y = 1/2 * x^2 - 1/2 * x + 1/4 + 7/4 * e^(-2*x)

In our next blog, we will look at how Laplace transforms will assist us in solving systems of differential equations.

Thanks as always, comments and questions are welcomed!


This blog is property of Edward Shore. 2013

Differential Equations #5: An intro to Laplace Transforms

Laplace transforms is an integral transform that assists is in solving problems in physics, engineering, and differential equations. This section will introduce Laplace transforms, and we will see how they help in solving some differential equations in the next two sections.

The formal definition of the Laplace transform is:


L( f(t) ) = F(s) = ∫ (e^(-s*t) * f(t) dt, 0, infinity)

(The "L" is usually written in curve like style)

t and s are placeholder variables. Alternatively, we see x in place of t.

L( f(x) ) = F(s) = ∫ (e^(-s*x) * f(x) dx, 0, infinity)

There are many properties of Laplace transforms, but the ones that will help us are:
(1) L( f(t) + g(t) ) = L( f(t) ) + L( g(t) )
(2) L( a*f(t) ) = a*L( f(t) )


Here is a basic table of Laplace Transforms. You can find more complete tables in math reference books and online. One such source is this table from Lamar University in Texas:
(Web page: http://tutorial.math.lamar.edu/pdf/Laplace_Table.pdf )



L( f(t) ) → F(s)
1 → 1/s
t^n → n!/(s^(n+1))
e^(a*t) → 1/(s-a)
sin(a*t) → a/(s^2 + a^2)
t*sin(a*t) → (2*a*s)/((s^2 + a^2)^2)
cos(a*t) → s/(s^2 + a^2)
t*cos(a*t) → (s^2 - a^2)/((s^2 + a^2)^2)
sinh(a*t) → a/(s^2-a^2)
cosh(a*t) → s/(s^2-a^2)
e^(a*t)*sin(b*t) → b/((s-a)^2 + b^2)
e^(a*t)*cos(b*t) → (s-a)/((s-a)^2 + b^2)
e^(a*t)*sinh(b*t) → b/((s-a)^2 - b^2)
e^(a*t)*cosh(b*t) → (s-a)/((s-a)^2 - b^2)


Laplace Transform Examples

1. f(t) = e^(2*t)

From e^(a*t) → 1/(s-a) , a = 2, and then:

L(e^(2*t)) = 1/(s-2)

2. f(t) = cos(3*t)

From cos(a*t) → s/(s^2 + a^2), we find that a = 3 and...

L(cos(3*t)) = s/(s^2 + 9)

3. f(x) = 2 + 3*x

Note that:
1 → 1/s
t^n → n!/(s^(n+1))

L(f(x)) = L(2 + 3*x) = L(2) + L(3*x) = 2/s + 3/s^2

4. f(x) = e^-x * sinh(2*x)

The transform to be used here is: e^(a*t)*sinh(b*t) → b/((s-a)^2 - b^2)
And here a=-1 and b = 2

L(e^-x * sinh(2*x)) = 2/((s+1)^2 - 4)

Which can also be written 2/(s^2 + 2*s - 3)

Inverse Laplace Transforms

L⁻¹( F(s) ) = f(t)

Often taking the inverse is more difficult. Sometimes algebraic manipulation is required to get F(s) into proper form for the inverse transformation. Practice, patience, and perhaps either a calculator with CAS capabilities or mathematical software are all useful tools for taking inverse Laplace transforms.

Let's start with a simple inverse transform.

5. 1/s^2

From t^n → n!/(s^(n+1)), we see that n+1=2, n=1, and...

L⁻¹(1/s^2) = t (or x)

6. 12/(3*s + 9)

The first thing we need to do is algebraically manipulate F(s) into a useable form. Observe that:

12/(3*s + 9) = 4/(s + 3)

Using the transformation e^(a*t) → 1/(s-a), we note that a=-3 and,

L⁻¹(12/(3*s + 9)) = L⁻¹(4/(s + 3)) = 4 * L⁻¹(1/(s + 3))
= 4*e^(-3*t)

7. (2s - 6)/(s^2 + 2*s - 3)

Note: s^2 + 2*s - 3 = (s - 1)*(s + 3)

By decomposition of fractions:
(2s - 6)/(s^2 + 2*s - 3) = -1/(s - 1) + 3/(s + 3)

Then:
L⁻¹(-1/(s - 1) + 3/(s + 3))
= L⁻¹(-1/(s - 1)) + 3 * L⁻¹(1/(s + 3))
= -e^-t + 3*e^(-3*t)

8. (s + 3)/(s^2 + 2*s + 5)

Note that: s^2 + 2*s + 1 = (s + 1)^2

By completing the square in the denominator:
s^2 + 2*s + 5 = s^2 + 2*s + 1 + 4 = (s + 1)^2 + 4

And (s + 3)/(s^2 + 2*s + 5) = (s + 3)/( (s + 1)^2 + 4 )

It looks like the forms we will use are:
e^(a*t)*sin(b*t) → b/((s-a)^2 + b^2)
e^(a*t)*cos(b*t) → (s-a)/((s-a)^2 + b^2)

We will have get the numerator ready: s + 3 = (s + 1) + 2

So we have (s + 3)/( (s + 1)^2 + 4 ) = (s+1)/((s+1)^2+4) + 3/((s+1)^2+4)

Hence:
L⁻¹( (s + 3)/(s^2 + 2*s + 5) )
= L⁻¹( (s+1)/((s+1)^2+4) + 3/((s+1)^2+4) )
= L⁻¹( (s+1)/((s+1)^2+4) ) + L⁻¹( 3/((s+1)^2+4) )
= e^(-t) * cos(2*t) + e^(-t) * sin(2*t)


Now that we had an introduction to Laplace transforms, we will use them to help solve differential equations. Until next time, Eddie!


This blog is property of Edward Shore. 2013

Thursday, August 15, 2013

Differential Equations #4: Homogeneous Second-Order Differential Equations

Solving y'' + A*y' + B*y = 0
(A and B are assumed to be real numbers)

There are two characteristics for this type of equation:

(1) Second-order: The second derivative of y, (y'') is involved, and
(2) Homogeneous: The equation is equal to 0.

We also have constant coefficients A and B. Here is a way to tackle this type of equation:

1. Turn the equation into a characteristic equation. Substitute the following: y'' = λ^2, y' = λ, and y = 1. As a result we have

λ^2 + A * λ + B = 0

2. Solve for λ. Let λ1 and λ2 be the roots of the polynomial.

λ = (-A ± √(A^2 - 4*B))/2 where
λ1 = (-A + √(A^2 - 4*B))/2
λ2 = (-A - √(A^2 - 4*B))/2

3. The nature of λ1 and λ2 determines the nature of solution.

The root is a real double root. λ1 = λ2
The solution takes the form: y = C1 * e^(λ1 * x) + x * C2 * e^(λ1*x)

The roots are distinct and real.
The solution takes the form: y = C1 * e^(λ1*x) + C2 * e^(λ2*x)

The roots are complex, in the form of λ = S ± T*i
The solution takes the form:
y = C1 * e^(S*x) cos(T*x) + C2 * e^(S*x) * sin(T*x)

On initial value problems, you are given y(x0) = y0 and y'(x1) = y1. You can solve for C1 and C2.

There are also boundary value problems, in where you are given y(x0) = y0 and y(x1) = y1. Approach this like solving initial value problems, solve for y first, then solve for C1 and C2.

1. y" - 3*y' - 10*y = 0

The characteristic equation is:

λ^2 - 3*λ - 10 = 0

The roots are λ = 5 and λ = 2. The solution is

y = C1*e^(5*x) + C2*e^(-2*x)

2. y" - 6*y' + 9*y = 0

The characteristic equation is:
λ^2 - 6*λ + 9 = 0

Where the roots are λ = 3 and λ = 3 - a double root. Our solution is:

y = C1*e^(3*x) + C2*x*e^(3*x)

3. y" - 2*y' + 5*y = 0

The characteristic equation is:
λ^2 - 2*λ + 5 = 0

Where the roots are λ = 1 ± 2*i. With complex roots to the characteristic equation, the solution takes the form of:

y = C1*e^x*cos(2*x) + C2*e^x*sin(2*x)

The next time in the series, which will be in a week or so, we will spend several entries regarding the Laplace Transforms and how they can assist in solving differential equations.

Have a great day! Eddie


This blog is property of Edward Shore. 2013

Differential Equations #3: General First-Order Linear Differential Equations

On this installment of the Differential Equation series, we will look at general linear differential equations which takes the form

y' + p(x) * y = q(x)

On this blog entry, we are going to go over a general procedure on how to solve these type of equations. The procedure requires a multiplicative factor called the integrating factor.

Procedure to solve y' + p(x) * y = q(x)

1. Calculate the integrating factor I = e^( ∫ p(x) dx).

2. Multiply the factor, I, to the equation, resulting in:
I * y' + (p(x) * I) * y = q(x) * I

Since I' = d/dx ( ∫ p(x) dx) * e^( ∫ p(x) dx) = p(x) * e^( ∫ p(x) dx), I' = I * p(x).

Then I * y' + I' * y = q(x) * I

By the derivative product rule, d/dx ( I * y ) = q(x) * I

3. Take the integral with respect to x on both sides:

I * y = ∫ (q(x) * I) dx + C

4. Solve for y. If an initial condition is given, you can solve for C.

y = ( ∫ q(x) * I dx + C) / I



We can summarize this produce by the following:

To solve y' + p(x) * y = q(x)

y = ( ∫ q(x) * I dx + C) / I, where I = e^( ∫ p(x) dx)



Let's work on some examples.

1. y' + 3*y = x

Here p(x) = 3 and q(x) = x. The integrating factor is I = e^( ∫ p(x) dx), so for this example, I = e^( ∫ 3 dx) = e^(3*x). Now:

e^(3*x) * y' + 3 * y * e^(3*x) = x * e^(3*x)
d/dx (y * e^(3*x) ) = x * e^(3*x)
∫ d/dx (y * e^(3*x)) dx = ∫ x * e^(3*x) dx

Using integration by parts on the right side:
y * e^(3*x) = (x*e^(3*x))/3 - (e^(3*x))/9 + C

y = x/3 - 1/9 + C*e^(-3*x)

2. y' + 2/x * y = x^3

Here p(x) = 2/x and q(x) = x^3, and the integrating factor is
I = e^( ∫ 2/x dx) = e^(2*ln x) = e^(ln (x^2)) = x^2

Then:
d/dx (y * x^2) = x^2 * x^3
d/dx (y * x^2) = x^5
∫ d/dx (y * x^2) dx = ∫ x^5 dx
y * x^2 = x^6/6 + C

y = x^4/4 + C*x^(-2)

3. y' + x*y = 2*x, y(0)=3

First, solve for y:
p(x) = x
q(x) = 2*x
I = e^( ∫ x dx) = e^(x^2/2)

d/dx (e^(x^2/2) * y) = e^(x^2/2) * 2 * x
e^(x^2/2) * y = ∫ e^(x^2/2) * 2 * x dx + C
e^(x^2/2) * y = 2*e^(x^2/2) + C
y = 2 + C*e^(-x^2/2)

Using the initial condition y(0)=3 to solve for C:
3 = 2 + C*e^0
C = 1

The final answer is:
y = 2 + e^(-x^2/2)

The next time we will look at (simple) second-order differential equations, and how solving a quadratic equation helps solve the differential equations. Please leave comments and questions below.

Take care, Eddie



This blog is property of Edward Shore. 2013

Differential Equations #2: Separable Differential Equations

Separable Equations

Here is where we start looking at differential equations that are more complex than y' = f(x). We will look at some techniques that can be used. Please note that no one technique will analytically solve all differential equations.

When solving differential equations, sometimes intuition, good algebra, and perhaps luck, we can separate variables of a first-order ordinary differential equation into the form of:

f(x) dx + g(y) dy = 0
[y is a function of x]

Taking the integral of each variable separably will yield:

∫ f(x) dx + ∫ g(y) dy = ∫ 0 dx
∫ f(x) dx + ∫ g(y) dy = C

We could also see the form:

f(x) dx = g(y) dy
∫ f(x) dx = ∫ g(y) dy

The answer could take either form:
∫ f(x) dx + C = ∫ g(y) dy, or
∫ f(x) dx = ∫ g(y) dy + C

Remember C is just an arbitrary constant. If we have initial conditions attached to the differential equation, then we can solve for C.

At this point, we may or may not be able to explicitly solve for y. The best way to tell whether a differential equation is separable is by practice and experience. Let's look at a few examples.

1. y^2 * y' = x^2

y' is short notation for dy/dx (or dy/dt if the dependent variable is t).

y^2 * y' = x^2
y^2 * dy/dx = x^2
y^2 dy = x^2 dx
∫ y^2 dy = ∫ x^2 dx + C
y^3/3 = x^3/3 + C

Solving for y, we get y = (x^3 + C/3)^(1/3).

2. e^(y-x)*dy/dx = 1

e^(y-x)*dy/dx = 1
e^y * e^(-x) * dy/dx = 1
e^y * dy = e^x * dx
∫ e^y dy = ∫ e^x dx + C
e^y = e^x + C

Solving for y, we get y = ln (e^x + C).

3. dy/dx = y^2 - 6*y + 9

dy/dx = y^2 - 6*y + 9

Diving by y^2 - 6*y + 9, (making an assumption that y ≠ 3 which we are not dividing by zero),

dy/dx * 1/(y^2 - 6*y + 9) = 1
dy/(y^2 - 6*y + 9) = dx
dy/(y - 3)^2 = dx
∫ dy/(y - 3)^2 = ∫ dx
-1/(y - 3) = x + C
1/(3 - y) = x + C
3 - y = 1/(x + C)
-y = -3 + 1/(x + C)
y = 3 - 1/(x + C)

Here is a separable differential equation with an initial condition:
4. y' = y^2 * x^3, y(1)=4

Solve the differential equation first:

dy/dx = y^2 * x^3
y^-2 dy = x^3 dx
∫ y^-2 dy = ∫ x^3 dx
-1/y = x^4/4 + C
-y = 1/(x^4/4 + C)
y = -1/(x^4/4 + C)

Now using the initial condition y(1)=4,
4 = -1/(1/4 + C)
4 * (1/4 + C) = -1
1 + 4*C = -1
C = 1/2

The final answer is y = -1/(x^4/4 + 1/2).

The next time we talk on this subject we will be looking at integrating factors. Eddie


This blog is property of Edward Shore. 2013

Differential Equations #1: The Basics



An Introduction

Simply put, a differential equation is an equation that involves an unknown function and it's derivatives. Your goal is to solve for the function. Students usually take a course in differential equations after finishing calculus.

Example of differential equations include:

(I). dy/dx = 2*x + 5
(II). 2y' - y = 0
(III). dy/dx + dy/dt = y - t
(IV). (sin x) * dx/dt + (cos y) * dx/dy = 1

Ordinary differential equations involve unknown functions of only one variable. From above, equations (I) and (II) are ordinary differential equations. Partial differential equations involve unknown multi-variable functions. Examples include equations (III) and (IV).

In this series, I will concentrate on ordinary differential equations.

The order of a differential equation is determine by the largest-order derivative. All four equations, (I) through (IV), are differential equations of the first-order.

An example of a second-order differential equation is
y'' + 2*y' - 3*y = e^x.

We are going to be begin with the most basic differential equation, dy/dx = f(x).

Solving dy/dx = f(x)

When solving equations in the form dy/dx = f(x), it is matter of knowing your integral calculus, because:

dy/dx = f(x)

All that needs to be done is to take the integral of both sides and we get:

y(x) = ∫ f(x) dx + C

where C is some constant. We'll talk about C later.


Need to brush up on your anti-derivatives? Here are some common ones:
∫ a dx = a*x
∫ x^n dx = x^(n+1)/(n+1)
∫ e^x dx = e^x
∫ ln x dx = 1/x
∫ sin x dx = -cos x
∫ cos x dx = sin x
Integration by Parts:
∫ u'(x)*v(x) dx = u(x)*v(x) - ∫ u(x)*v'(x) dx

There are far more complete tables in reference books or online.


Now let's get to work.

1. dy/dx = 2*x + 4

Simple as it gets, just take the integral of 2x + 4 and we get:

y = x^2 + 4*x + C

2. y' = 2*e^(2*x)

We have:

y = ∫ 2*e^(2*x) dx + C = e^(2*x) + C

Initial Conditions

Differential equations may have additional conditions called initial conditions. Initial conditions give the value of the function (and it's derivatives - to order n-1) at some given point. Initial conditions given at x=0 is common. Initial conditions allow us to solve for the constant (C).

3. dy/dx = 2*x + 4, y(1)=0

Here we have an initial condition y(1)=0. Any time we have initial conditions, we solve the differential equation first, then solve for the constant.*

So:
dy/dx = 2*x + 4
y = x^2 + 4*x + C

With y(1)=0, substitute x=1 and y=0 and solve for C.
0 = 1^2 + 4*1 + C
C = -5

Our final answer is y = x^2 + 4*x - 5.

4. y' = 2*e^(2*x), y(0)=2

y' = 2*e^(2*x)
y = e^(2*x) + C

Taking in the initial condition y(0)=2:

2 = e^(2*0) + C
C = 1

Our final answer is y = e^(2*x) + 1.


* The procedure is slightly different when it comes to using Laplace Transforms, which is later on in the series.


We have come to the conclusion of Part 1. Next time in this series, we will be talking about separable equations. Hope to see you then! Eddie

This blog is property of Edward Shore. 2013




Monday, August 12, 2013

Completing the Square

Goal: Transform x^2 + a*x + b to (x + c)^2 + d.

Setting the two sides equal to each other:
x^2 + a*x + b = (x + c)^2 + d
x^2 + a*x + b = x^2 + 2*c*x + c^2 + d

Next I will use a technique that calculus students normally use when decomposing partial fractions.

Setting the coefficients of x^2, x, and the constant equal to each other, we have:
x^2: 1 = 1
x: a = 2*c
constant: b = c^2 + d

Solving for c:
a = 2*c
c = a/2

Then solving for d:
b = c^2 + d
b = a^2/4 + d
d = b - a^2/4

Hence:
x^2 + a*x + b = (x + a/2)^2 + (b - a^2/4)


Hope this helps. Until next time!

Eddie



This blog is property of Edward Shore. 2013

The TI-34 Calculator: The Original 1-Line TI-34

Greetings everyone!

Not too long ago I purchased an original-style TI-34 from Amazon; the one with the single line display. I the one purchased was made in, if I am reading the date code correctly, in 1991. So it is the second edition of the TI-34, because it has blue arithmetic keys. The original, made in 1987, had red arithmetic keys.

Source: http://datamath.org/Sci/Modern/TI-34.htm

Features:
* 10 digit display
* Trig functions
* Polar and Rectangular Conversions
* Fractions
* Boolean Operations and Base Conversions
* 1 Variable Statistics

Today's TI-34, which is called TI-34 MultiView, we gain a multi-line screen, the ability to type calculations in textbook form, integer functions (absolute value, LCM, GCD, etc.), two custom function programming, and linear regression. However, Boolean operations and base conversions are not available on the MultiView.

This is the TI-34 when it arrived at my door:

The keys all worked, but noticing the keypad had faded numbers, I figure a makeover was in order:

OK, art expert I am not. Cutting small stickers are not my forte either. At least the numbers, decimal point, and the change sign key are readable again.



Update: I am still working on the differential equations series. The series tentatively has these topics:

* Basic Differential Equation Solving
* Separable Equations
* First Order Linear Equations
* Second Order Homogenous Equations
* Laplace Transforms
* Runge-Kutta Approximation

The list of topics is subject to change. If you have suggestions, please let me know, always appreciate the feedback.


Until next time, have a great day. School is just around the corner for many so enjoy the summer vacation while it lasts! For those of you in the Southern Hemisphere, hopefully the winter isn't being rough. Stay safe everyone!

Eddie


This blog is property of Edward Shore. 2013

TI 84 Plus CE: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...