Lesson 3 Mathematica PDF

Title Lesson 3 Mathematica
Author Strato
Course Fundamental Mathematics I
Institution Concordia University
Pages 12
File Size 337.1 KB
File Type PDF
Total Downloads 65
Total Views 148

Summary

Lesson 3 Mathematica notes...


Description

Lesson 3 Mathematica Notes Source: Finite Mathematics by Barnett, Ziegler, Byleen The Mathematica Notes consists of illustrations of the topics in the Textbook Notes. The illustrations are presented both conceptually and computationally. The conceptual versions present the mathematical context of the examples and the computational ones show how to solve the given problems using Mathematica. ◼ The html version of this document is for easy viewing on mobile devices such as laptops, tablets and smartphones. ◼ The cdf version of the document is dynamic and facilitates the experimental exploration of the course material using Mathematica.

Exponential and Logarithmic Functions

Contents 1. Exponential functions 2. Properties of exponential functions 3. Logarithmic functions 4. Properties of logarithmic functions 5. Mathematica illustrations of textbook examples For easy cross-reference, the numbers of the Mathematica illustrations of the textbook examples correspond to the numbers of the examples as they appear in the textbook.

1. Exponential functions Definition Suppose b > 0 is a positive real number and not equal to 1. Then we can use b as the “base” of an

Printed by Wolfram Mathematica Student Edition

2

L3-notes.cdf

“exponential” function f: f[x_] := bx

Numerical example b := 2 f[x_] := bx f[x] 2x

We can also use the Mathematica Power command to write exponential functions: b := 2 g[x_] := Power[b, x] g[x] 2x Plot[f[x], {x, -5, 5}]

15

10

5

-4

-2

2

4

Numerical example b := 1 +

1

x f[x_] := bx f[x] 1

x

+1

x

Printed by Wolfram Mathematica Student Edition

L3-notes.cdf

3

Plot[f[x], {x, 1, 6}] 2.5

2.4

2.3

2.2

2.1

2

3

4

5

6

Conceptual example One of the famous real numbers that is often used as the base of exponential functions is the number ⅇ. It is usually defined in calculus as the limiting value of a sequence of the exponential functions 1+

1

x

x

as x becomes larger and larger: Limit 1 +

1 x

x

, x → Infinity



In Mathematica, the function f[x] = ⅇx is denoted by Exp[x], so that ⅇ = Exp[1]. Thus Exp[x] ⩵ Power[ⅇ, x] True

The number ⅇ is very special number: it is an irrational number in the sense that no integers a and b for which ⅇ = a/b. A deeper look at ⅇ reveals that ⅇ fails another classification of number: it is not a root of any polynomial of the form an xn + an-1 xn-1 + ⋯ + a1 x + a0

with integer coefficients an , an-1, … , a1, a0. Hence ⅇ is called a “transcendental” number. Mathematicians have studied the patterns of many approximations of ⅇ. Here are three of them: {N[ⅇ], N[ⅇ, 10], N[ⅇ, 50]} {2.71828, 2.718281828, 2.7182818284590452353602874713526624977572470937000}

This tells us that 2.7 < ⅇ < 2.8. In Mathematica, it is often easiest to write Exp[1] instead of the special symbol ⅇ. However, if you must or like to use the symbol ⅇ, the keyboard shortcut “Escape e e Escape” will produce it for you. You can also use the Writing Assistant Palette to produce the special symbol. If you let the cursor hover over the symbol in the palette, the keyboard strokes required to produce the

Printed by Wolfram Mathematica Student Edition

4

L3-notes.cdf

symbol will appear.

Conceptual example Exponential functions of form 1+

r

mt

m

arise naturally in problems involving compound interest charged or eared for loans or investments.

Numerical example b := Exp[1] f[x_] := bx f[x] ⅇx Plot[f[x], {x, -3, 3}] 20

15

10

5

-3

-2

-1

1

2

3

Numerical example b := Exp[1] f[x_] := bx f[x] ⅇx

Printed by Wolfram Mathematica Student Edition

L3-notes.cdf

Plot[f[x], {x, -3, 3}] 20

15

10

5

-3

-2

-1

1

2

3

1

2

3

Numerical example b := Exp[1] f[x_] := b-x f[x] ⅇ-x Plot[f[x], {x, -3, 3}] 20

15

10

5

-3

-2

-1

Numerical example b := Exp[1] f[x_] := bx g[x_] := b-x {f[x], g[x]} {ⅇx , ⅇ-x }

Printed by Wolfram Mathematica Student Edition

5

6

L3-notes.cdf

Plot[{f[x], g[x]}, {x, -3, 3}] 20

15

10

5

-3

-2

-1

1

2

3

2. Properties of exponential functions 1. ax ay = ax+y x

2.  aay  = ax-y 3. (ax)y = axy 4. (ab)x = ax bx x

x

5.  ab  = bax 6. Exponential functions are one-to-one: ax = ay if and only if x = y. 7. ax = bx if and only if a = b.

Numerical example 23 25 ⩵ 23+5 True

Numerical example 23 25

⩵ 23-5

True

Numerical example 5

23  == 23

5

True

Printed by Wolfram Mathematica Student Edition

L3-notes.cdf

Numerical example 2 35 ⩵ 25

35

True

Numerical example 2

5

3



25 35

True

Conceptual example ⅇx = ⅇy if and only if x = y

This says that the exponential function is one-to-one.

Numerical example 2

2

Since the exponential function is one-to-one, the equation ⅇ2 x +x-3 = ⅇx +5 holds if and only if 2 x2 + x - 3 ⩵ x2 + 5

Let us solve this equation. Quit[] Solve2 x2 + x - 3 ⩵ x2 + 5, x x →

1 2

-1 -

33 , x →

1 2



33 - 1

3. Logarithmic functions Definition The inverse of an exponential function is called a “logarithmic” function. What do we mean by an inverse function? If g and f are two functions with the property that g[f[x]] = x and f[g[y]] = y

for all x and y, then g is called the inverse of f and f is called the inverse of g. We write

Printed by Wolfram Mathematica Student Edition

7

8

L3-notes.cdf

g[y] = Log[b, y]

for the inverse of f[x] = Power[b, x]

Conceptual example Log[b, Power[b, x]] ⩵ x

and Power[b, Log[b, y]] ⩵ y

Numerical example Log[2, Power[2, 5]] ⩵ 5 True Power[2, Log[2, 5]] ⩵ 5 True

Numerical example Log[ⅇ, Exp[5]] ⩵ 5 True Exp[Log[ⅇ, 5]] ⩵ 5 True

By default, the Mathematica notation for Log[ⅇ,y] is usually simplified to Log[y]. Log[Exp[5]] ⩵ 5 True Exp[Log[5]] ⩵ 5 True

4. Properties of logarithmic functions 1. Log[b,1] = 0 2. Log[b,b] = 1 3. Log[b, bx] = x 4. bLog[b,x] = x for x > 0 5. Log[b,x y] = Log[b,x] + Log[b,y]

Printed by Wolfram Mathematica Student Edition

L3-notes.cdf

6. Log[b,x/y] = Log[b,x] - Log[b,y] 7. Log[b, x p ] = p Log[b, x] 8. Logarithmic functions are one-to-one: Log[b,x] = Log[b,y] if and only if x = y.

Numerical example Log[2, 1] ⩵ 0 True

Numerical example Log[2, 2] ⩵ 1 True

Numerical example Log2, 25  ⩵ 5 True

Numerical example 2Log[2,3] ⩵ 3 True

Numerical example Log[2, 3 5] ⩵ Log[2, 3] + Log[2, 5] True

Numerical example Log2,

3 5

 ⩵ Log[2, 3] - Log[2, 5]

True

Numerical example SimplifyLog2, 35  ⩵ 5 Log[2, 3] True

5. Mathematica illustrations of textbook examples

Printed by Wolfram Mathematica Student Edition

9

10

L3-notes.cdf

These examples are based on the 12th edition of Finite Mathematics for Business, Economics, Life Sciences, and Social Sciences by Barnett, Ziegler, Byleen, Prentice Hall 2011, ISBN 10: 0-321-61401-1.

Section 2-5 (Exponential functions) Example 2 Exponential growth. Cholera, an intestinal disease, is caused by a cholera bacterium that multiplies exponentially by cell division. The number of bacteria grows continually at a relative growth rate of 1. 386, that is, n = n0 Exp[1.386 t]

where n is the number of bacteria present after t hours and n0 is the number of bacteria present at the start (t = 0). If we start with 25 bacteria, how many bacteria (to the nearest unit) will be present (A) In 0.6 hours? (B) in 3.5 hours?

Mathematica illustration Example 4 Depreciation. Consider the following data: data := {{1, 12 575}, {2, 9455}, {3, 8115}, {4, 6845}, {5, 5225}, {6, 4485}}

representing the market value of a hybrid sedan (in dollars) x years after its purchase. Find an exponential regression model of the form y = a bx

for this data set. Estimate the purchase price of the sedan and its value 10 years after its purchase.

Mathematica illustration model = FindFitdata, a bx , {a, b}, x {a → 15 111., b → 0.812643} f[x_] := 15 111 0.812643x FindFitdata, a bx , {a, b}, x {a → 15 111., b → 0.812643} Tablea bx /. model, {x, 0, 10} {15 111., 12 279.8, 9979.11, 8109.45, 6590.09, 5355.39, 4352.02, 3536.64, 2874.03, 2335.56, 1897.97}

This calculation suggests that the initial purchase price was $15,111 and that after 10 years, the sedan will be worth approximately $1,897.

Printed by Wolfram Mathematica Student Edition

L3-notes.cdf

11

Section 2-6 (Logarithmic functions) Example 5 Solve the following logarithmic equation for x: 3 2

logb 4 -

2 3

logb 8 + logb 2 = logb x

Mathematica illustration 3 2

logb 4 -

2 3

3/2

logb 22 

logb 8 + logb 2 = logb x 2/3

- logb 23 

+ logb 2 = logb x

logb 23 - logb 22 + logb 2 = logb x 23 2

logb

22

= logb x

logb 22 = logb x 4=x

Example 10 Doubling time for an investment. How long (to the next whole year) will it take money to double if it is invested at 20% compounded annually?

Mathematica illustration The function required to solve this problem is the compound interest function: A = P (1 +

r mt  m

where P is the amount invested, A is the future value of the investment, m is the number of compounding periods per year, and r is the annual rate of interest. Let us solve this problem by investing $1 and trying to find out how long it will take for this dollar to yield $2. P = 1; r = .2; m = 1; A = 2;

Our first Solve2 ⩵ 1 + .2t , t Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. 

{{t → 3.80178}}

We can also solve the associated logarithmic equation:

Printed by Wolfram Mathematica Student Edition

12

L3-notes.cdf

Solve[Log[2] ⩵ t Log[1.2], t] {{t → 3.80178}}

As expected, we get the same answer.

End of the Mathematica Notes for Lesson 3

Printed by Wolfram Mathematica Student Edition...


Similar Free PDFs