Integrating Functions by Matrix Multiplication

47
Integrating Functions by Matrix Multiplication Thomas M. Everest University of Pittsburgh Undergraduate Mathematics Seminar, October 3, 2017 Everest Integrating Functions by Matrix Multiplication

Transcript of Integrating Functions by Matrix Multiplication

Page 1: Integrating Functions by Matrix Multiplication

Integrating Functions by Matrix Multiplication

Thomas M. Everest

University of Pittsburgh

Undergraduate Mathematics Seminar,October 3, 2017

Everest Integrating Functions by Matrix Multiplication

Page 2: Integrating Functions by Matrix Multiplication

Preliminaries

Linear Transformation

Suppose the V and W are vector spaces over the same field F.

T : V →W is a linear transformation if

1 T (v1 + v2) = Tv1 + Tv2, for all v1, v2 ∈ V ; and

2 T (kv) = kTv , for all k ∈ F and for all v ∈ V .

Everest Integrating Functions by Matrix Multiplication

Page 3: Integrating Functions by Matrix Multiplication

Preliminaries

Linear Transformation

Suppose the V and W are vector spaces over the same field F.

T : V →W is a linear transformation if

1 T (v1 + v2) = Tv1 + Tv2, for all v1, v2 ∈ V ; and

2 T (kv) = kTv , for all k ∈ F and for all v ∈ V .

Everest Integrating Functions by Matrix Multiplication

Page 4: Integrating Functions by Matrix Multiplication

Linear Transformation Example

Suppose that V = R4 and W = R3. Let T : V →W be definedby:

T

xyzw

=

x + 2ywz

for all v =

xyzw

∈ V

Everest Integrating Functions by Matrix Multiplication

Page 5: Integrating Functions by Matrix Multiplication

Linear Transformation Example

T

x1y1z1w1

+

x2y2z2w2

= T

x1 + x2y1 + y2z1 + z2w1 + w2

=

(x1 + x2) + 2(y1 + y2)w1 + w2

z1 + z2

=

x1 + 2y1w1

z1

+

x2 + 2y2w2

z2

= T

x1y1z1w1

+ T

x2y2z2w2

Everest Integrating Functions by Matrix Multiplication

Page 6: Integrating Functions by Matrix Multiplication

Linear Transformation Example

T

k

xyzw

= T

kxkykzkw

=

kx + 2kykwkz

=

k(x + 2y)kwkz

= k

x + 2ywz

= kT

xyzw

Everest Integrating Functions by Matrix Multiplication

Page 7: Integrating Functions by Matrix Multiplication

Representing Linear Transformations with Matrices

Suppose that {v1, . . . , vn} is a basis for V and {w1, . . . ,wm} is abasis for W .

Write

Tv1 = a1,1w1 + · · ·+ am,1wm

Tv2 = a1,2w1 + · · ·+ am,2wm

...

Tvn = a1,nw1 + · · ·+ am,nwm

Everest Integrating Functions by Matrix Multiplication

Page 8: Integrating Functions by Matrix Multiplication

Representing Linear Transformations with Matrices

Suppose that {v1, . . . , vn} is a basis for V and {w1, . . . ,wm} is abasis for W .

Write

Tv1 = a1,1w1 + · · ·+ am,1wm

Tv2 = a1,2w1 + · · ·+ am,2wm

...

Tvn = a1,nw1 + · · ·+ am,nwm

Everest Integrating Functions by Matrix Multiplication

Page 9: Integrating Functions by Matrix Multiplication

Representing Linear Transformations with Matrices

Let

A =

a1,1 a1,2 · · · a1,na2,1 a2,2 · · · a2,n

......

. . ....

am,1 am,2 · · · am,n

m×n

Then, for any v ∈ V with coordinates

x1x2...xn

∈ Rn,

[Tv ] = A[v ]

Everest Integrating Functions by Matrix Multiplication

Page 10: Integrating Functions by Matrix Multiplication

Representing Linear Transformations with Matrices

Let

A =

a1,1 a1,2 · · · a1,na2,1 a2,2 · · · a2,n

......

. . ....

am,1 am,2 · · · am,n

m×n

Then, for any v ∈ V with coordinates

x1x2...xn

∈ Rn,

[Tv ] = A[v ]

Everest Integrating Functions by Matrix Multiplication

Page 11: Integrating Functions by Matrix Multiplication

Revisiting Linear Transformation Example

V = R4, W = R3, and T : V →W by T

xyzw

=

x + 2ywz

.

Let A =

1 2 0 00 0 0 10 0 1 0

.

Then, for any

xyzw

∈ R4, T

xyzw

=

1 2 0 00 0 0 10 0 1 0

xyzw

.

Everest Integrating Functions by Matrix Multiplication

Page 12: Integrating Functions by Matrix Multiplication

Revisiting Linear Transformation Example

V = R4, W = R3, and T : V →W by T

xyzw

=

x + 2ywz

.

Let A =

1 2 0 00 0 0 10 0 1 0

.

Then, for any

xyzw

∈ R4, T

xyzw

=

1 2 0 00 0 0 10 0 1 0

xyzw

.

Everest Integrating Functions by Matrix Multiplication

Page 13: Integrating Functions by Matrix Multiplication

Revisiting Linear Transformation Example

V = R4, W = R3, and T : V →W by T

xyzw

=

x + 2ywz

.

Let A =

1 2 0 00 0 0 10 0 1 0

.

Then, for any

xyzw

∈ R4, T

xyzw

=

1 2 0 00 0 0 10 0 1 0

xyzw

.

Everest Integrating Functions by Matrix Multiplication

Page 14: Integrating Functions by Matrix Multiplication

Integration Example

Find

∫ (2ex + 3xex − 4x2ex

)dx .

∫ (2ex + 3xex − 4x2ex

)dx

= 2

(∫ex dx

)+ 3

(∫xex dx

)− 4

(∫x2ex dx

)

= + +

=

Everest Integrating Functions by Matrix Multiplication

Page 15: Integrating Functions by Matrix Multiplication

Integration Example

Find

∫ (2ex + 3xex − 4x2ex

)dx .

∫ (2ex + 3xex − 4x2ex

)dx

= 2

(∫ex dx

)+ 3

(∫xex dx

)− 4

(∫x2ex dx

)

= + +

=

Everest Integrating Functions by Matrix Multiplication

Page 16: Integrating Functions by Matrix Multiplication

Integration Example

Find

∫ (2ex + 3xex − 4x2ex

)dx .

∫ (2ex + 3xex − 4x2ex

)dx

= 2

(∫ex dx

)+ 3

(∫xex dx

)− 4

(∫x2ex dx

)

= + +

=

Everest Integrating Functions by Matrix Multiplication

Page 17: Integrating Functions by Matrix Multiplication

Integration Example

Find

∫ (2ex + 3xex − 4x2ex

)dx .

∫ (2ex + 3xex − 4x2ex

)dx

= 2

(∫ex dx

)+ 3

(∫xex dx

)− 4

(∫x2ex dx

)

= + +

=

Everest Integrating Functions by Matrix Multiplication

Page 18: Integrating Functions by Matrix Multiplication

Integration Example - New Approach

Find

∫ (2ex + 3xex − 4x2ex

)dx .

Let V = span{ex , xex , x2ex}.

Let D : V → V be the differentiation transformation. (Note that itis important that D(V ) ⊂ V ).

The matrix that represents this transformation is

A =

1 1 00 1 20 0 1

Everest Integrating Functions by Matrix Multiplication

Page 19: Integrating Functions by Matrix Multiplication

Integration Example - New Approach

Find

∫ (2ex + 3xex − 4x2ex

)dx .

Let V = span{ex , xex , x2ex}.

Let D : V → V be the differentiation transformation. (Note that itis important that D(V ) ⊂ V ).

The matrix that represents this transformation is

A =

1 1 00 1 20 0 1

Everest Integrating Functions by Matrix Multiplication

Page 20: Integrating Functions by Matrix Multiplication

Integration Example - New Approach

Find

∫ (2ex + 3xex − 4x2ex

)dx .

Let V = span{ex , xex , x2ex}.

Let D : V → V be the differentiation transformation. (Note that itis important that D(V ) ⊂ V ).

The matrix that represents this transformation is

A =

1 1 00 1 20 0 1

Everest Integrating Functions by Matrix Multiplication

Page 21: Integrating Functions by Matrix Multiplication

The Inverse of Differentiation

Note that if D : V → V is the differentiation transformation, thenD−1 : V → V is the integration transformation (where +C = 0, sothat the transformation is linear).

FACTIf A represents the linear transformation D, then the inverse matrixA−1 represents the inverse transformation D−1.

In our case, if A =

1 1 00 1 20 0 1

, then A−1 =

1 −1 20 1 −20 0 1

.

Everest Integrating Functions by Matrix Multiplication

Page 22: Integrating Functions by Matrix Multiplication

The Inverse of Differentiation

Note that if D : V → V is the differentiation transformation, thenD−1 : V → V is the integration transformation (where +C = 0, sothat the transformation is linear).

FACTIf A represents the linear transformation D, then the inverse matrixA−1 represents the inverse transformation D−1.

In our case, if A =

1 1 00 1 20 0 1

, then A−1 =

1 −1 20 1 −20 0 1

.

Everest Integrating Functions by Matrix Multiplication

Page 23: Integrating Functions by Matrix Multiplication

The Inverse of Differentiation

Note that if D : V → V is the differentiation transformation, thenD−1 : V → V is the integration transformation (where +C = 0, sothat the transformation is linear).

FACTIf A represents the linear transformation D, then the inverse matrixA−1 represents the inverse transformation D−1.

In our case, if A =

1 1 00 1 20 0 1

, then A−1 =

1 −1 20 1 −20 0 1

.

Everest Integrating Functions by Matrix Multiplication

Page 24: Integrating Functions by Matrix Multiplication

Finishing the Previous Example

Previously, we wanted to find

∫ (2ex + 3xex − 4x2ex

)dx .

Notice that 2ex + 3xex − 4x2ex is an element of V .

The coordinates of this vector under the given basis are

23−4

.

Therefore, to find our integral, we need to findD−1(2ex + 3xex − 4x2ex).

Everest Integrating Functions by Matrix Multiplication

Page 25: Integrating Functions by Matrix Multiplication

Finishing the Previous Example

Previously, we wanted to find

∫ (2ex + 3xex − 4x2ex

)dx .

Notice that 2ex + 3xex − 4x2ex is an element of V .

The coordinates of this vector under the given basis are

23−4

.

Therefore, to find our integral, we need to findD−1(2ex + 3xex − 4x2ex).

Everest Integrating Functions by Matrix Multiplication

Page 26: Integrating Functions by Matrix Multiplication

Finishing the Previous Example

Previously, we wanted to find

∫ (2ex + 3xex − 4x2ex

)dx .

Notice that 2ex + 3xex − 4x2ex is an element of V .

The coordinates of this vector under the given basis are

23−4

.

Therefore, to find our integral, we need to findD−1(2ex + 3xex − 4x2ex).

Everest Integrating Functions by Matrix Multiplication

Page 27: Integrating Functions by Matrix Multiplication

The Calculation and the Interpretation

D−1(2ex + 3xex − 4x2ex)

=

1 −1 20 1 −20 0 1

23−4

=

−911−4

Therefore, we have that∫ (2ex + 3xex − 4x2ex

)dx = −9ex + 11xex − 4x2ex

Everest Integrating Functions by Matrix Multiplication

Page 28: Integrating Functions by Matrix Multiplication

The Calculation and the Interpretation

D−1(2ex + 3xex − 4x2ex)

=

1 −1 20 1 −20 0 1

23−4

=

−911−4

Therefore, we have that∫ (2ex + 3xex − 4x2ex

)dx = −9ex + 11xex − 4x2ex

Everest Integrating Functions by Matrix Multiplication

Page 29: Integrating Functions by Matrix Multiplication

The Extension

This technique now works quickly for any integral of this form.

Ex

Find

∫ (11xex +

2

3x2ex

)dx .

No need to restart!

Answer

D−1(11xex +2

3x2ex) =

1 −1 20 1 −20 0 1

01123

=

−29/329/32/3

.

Therefore,

∫ (11xex +

2

3x2ex

)dx = −29

3ex +

29

3xex +

2

3x2ex .

Everest Integrating Functions by Matrix Multiplication

Page 30: Integrating Functions by Matrix Multiplication

The Extension

This technique now works quickly for any integral of this form.

Ex

Find

∫ (11xex +

2

3x2ex

)dx .

No need to restart!

Answer

D−1(11xex +2

3x2ex) =

1 −1 20 1 −20 0 1

01123

=

−29/329/32/3

.

Therefore,

∫ (11xex +

2

3x2ex

)dx = −29

3ex +

29

3xex +

2

3x2ex .

Everest Integrating Functions by Matrix Multiplication

Page 31: Integrating Functions by Matrix Multiplication

The Extension

This technique now works quickly for any integral of this form.

Ex

Find

∫ (11xex +

2

3x2ex

)dx .

No need to restart!

Answer

D−1(11xex +2

3x2ex) =

1 −1 20 1 −20 0 1

01123

=

−29/329/32/3

.

Therefore,

∫ (11xex +

2

3x2ex

)dx = −29

3ex +

29

3xex +

2

3x2ex .

Everest Integrating Functions by Matrix Multiplication

Page 32: Integrating Functions by Matrix Multiplication

The Extension

This technique now works quickly for any integral of this form.

Ex

Find

∫ (11xex +

2

3x2ex

)dx .

No need to restart!

Answer

D−1(11xex +2

3x2ex) =

1 −1 20 1 −20 0 1

01123

=

−29/329/32/3

.

Therefore,

∫ (11xex +

2

3x2ex

)dx = −29

3ex +

29

3xex +

2

3x2ex .

Everest Integrating Functions by Matrix Multiplication

Page 33: Integrating Functions by Matrix Multiplication

The Problem

In order for this technique to work, we need D(V ) ⊂ V .

For example, we cannot use this technique to find∫ (ex

2+ xex

2)dx .

The problem is that D(ex2) = 2xex

2, D(xex

2) = (1 + 2x2)ex

2,

D(x2ex2) = (2x + 2x3)ex

2, . . . , etc.

Everest Integrating Functions by Matrix Multiplication

Page 34: Integrating Functions by Matrix Multiplication

The Problem

In order for this technique to work, we need D(V ) ⊂ V .

For example, we cannot use this technique to find∫ (ex

2+ xex

2)dx .

The problem is that D(ex2) = 2xex

2, D(xex

2) = (1 + 2x2)ex

2,

D(x2ex2) = (2x + 2x3)ex

2, . . . , etc.

Everest Integrating Functions by Matrix Multiplication

Page 35: Integrating Functions by Matrix Multiplication

The Problem

In order for this technique to work, we need D(V ) ⊂ V .

For example, we cannot use this technique to find∫ (ex

2+ xex

2)dx .

The problem is that D(ex2) = 2xex

2, D(xex

2) = (1 + 2x2)ex

2,

D(x2ex2) = (2x + 2x3)ex

2, . . . , etc.

Everest Integrating Functions by Matrix Multiplication

Page 36: Integrating Functions by Matrix Multiplication

Other Examples That Do Work!

1 V = span{sin x , cos x , x sin x , x cos x}

2 V = span{ex sin x , ex cos x}

Matrices (where B is A−1 from before):

1 B =

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2 B =

[1/2 1/2−1/2 1/2

]

(Notice the pattern to each matrix - THIS IS THE WINNINGSTRATEGY!)

Everest Integrating Functions by Matrix Multiplication

Page 37: Integrating Functions by Matrix Multiplication

Other Examples That Do Work!

1 V = span{sin x , cos x , x sin x , x cos x}2 V = span{ex sin x , ex cos x}

Matrices (where B is A−1 from before):

1 B =

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2 B =

[1/2 1/2−1/2 1/2

]

(Notice the pattern to each matrix - THIS IS THE WINNINGSTRATEGY!)

Everest Integrating Functions by Matrix Multiplication

Page 38: Integrating Functions by Matrix Multiplication

Other Examples That Do Work!

1 V = span{sin x , cos x , x sin x , x cos x}2 V = span{ex sin x , ex cos x}

Matrices (where B is A−1 from before):

1 B =

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2 B =

[1/2 1/2−1/2 1/2

]

(Notice the pattern to each matrix - THIS IS THE WINNINGSTRATEGY!)

Everest Integrating Functions by Matrix Multiplication

Page 39: Integrating Functions by Matrix Multiplication

Other Examples That Do Work!

1 V = span{sin x , cos x , x sin x , x cos x}2 V = span{ex sin x , ex cos x}

Matrices (where B is A−1 from before):

1 B =

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2 B =

[1/2 1/2−1/2 1/2

]

(Notice the pattern to each matrix - THIS IS THE WINNINGSTRATEGY!)

Everest Integrating Functions by Matrix Multiplication

Page 40: Integrating Functions by Matrix Multiplication

Other Examples That Do Work!

1 V = span{sin x , cos x , x sin x , x cos x}2 V = span{ex sin x , ex cos x}

Matrices (where B is A−1 from before):

1 B =

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2 B =

[1/2 1/2−1/2 1/2

]

(Notice the pattern to each matrix - THIS IS THE WINNINGSTRATEGY!)

Everest Integrating Functions by Matrix Multiplication

Page 41: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .[

1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]Therefore,∫

(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 42: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .[

1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]Therefore,∫

(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 43: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .[

1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]Therefore,∫

(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 44: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .

[1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]Therefore,∫

(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 45: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .[

1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]

Therefore,∫(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 46: Integrating Functions by Matrix Multiplication

1 Find

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx .

0 1 1 0−1 0 0 10 0 0 10 0 −1 0

2−13−2

=

2−4−2−3

Therefore,

∫(2 sin x − cos x + 3x sin x − 2x cos x) dx =

2 sin x − 4 cos x − 2x sin x − 3x cos x .

2 Find

∫(2ex sin x − 4ex cos x) dx .[

1/2 1/2−1/2 1/2

] [2−4

]=

[−1−3

]Therefore,∫

(2ex sin x − 4ex cos x) dx = −ex sin x − 3ex cos x .

Everest Integrating Functions by Matrix Multiplication

Page 47: Integrating Functions by Matrix Multiplication

THE END

Thank you, and . . .Ask me more about Math 0280!

Everest Integrating Functions by Matrix Multiplication