1
The Puritans
Come out of the Calvinist protestant tradition
Felt that the protestant revolution in the Church of England had not gone far enough in purging Roman
Catholic traditions and practices. They wanted to purify the church.
Their beliefs put t
LINEAR ALGEBRA WITH NUMERICAL ANALYSIS FOR. ENGINEERING.
AM 1411

Fall 2014
Least Squares Approximations
D.J. Jerey
The University of Western Ontario
March 23, 2014
The system of equations
k
=
1.6 ,
k
=
1.8
does not have a solution for k: it is inconsistent. Why should we ever want to consider systems of equations that do not
hav
LINEAR ALGEBRA WITH NUMERICAL ANALYSIS FOR. ENGINEERING.
AM 1411

Fall 2014
QUESTION KEY 210153
University of Western Ontario
AM 1411 Matlab test
This is a sample for test during week of March 9 12
Student Name:
Student Number:
1. (2 marks) Calculate the inverse matrix A1 of
8 34 13
A = 15 9 40
23 8 21
Write the value of the (1,
LINEAR ALGEBRA WITH NUMERICAL ANALYSIS FOR. ENGINEERING.
AM 1411

Fall 2014
Matrices and Linear Transformations
D.J. Jerey
Department of Applied Mathematics
U. Western Ontario
March 23, 2014
1
1.1
Applications of linear transformations
Transformations in Engineering
An important activity in engineering is tracking the way thinks
LINEAR ALGEBRA WITH NUMERICAL ANALYSIS FOR. ENGINEERING.
AM 1411

Fall 2014
Least Squares Approximations
D.J. Jerey
The University of Western Ontario
March 5, 2015
The system of equations
k
=
1.6 ,
k
=
1.8
does not have a solution for k: it is inconsistent. Why should we ever want to consider systems of equations that do not
have
LINEAR ALGEBRA WITH NUMERICAL ANALYSIS FOR. ENGINEERING.
AM 1411

Fall 2014
Plan for AM1411a
Section numbers refer to Anton
March 5, 2015
Week
Subjects
Source material
1. Jan 5
Engineering applications
Electrical circuits
Pipe ow
Exact interpolation
Augmented Matrix
Gauss Elim. Row reduction
Homogeneous systems
Matrix Algebra
, m
Introduction to Maple 1
You should first go to http:/myvlab.uwo.ca/ and setup myvlab for your system.
It's easy, and gives you access to Maple and other programs on your own system.
Then open a Maple session, click on File > New > Document Mode (Workshe
Applied Mathematics 2811b  University of Western Ontario
Selected Solutions for Assignment 1, 2015
1. A : The equations are exactly similarly as given in the problem statement, except you replace the single variable x by two variables x1 and x2 and repla
1 Smugme To Axum! Fwd 5mm
"M" ABM 24! £00? (artwerV/m 15) Pvt/[3'
i (a) d)t_r>é gofel
L03) + L('v"°)
L <ch "5 C L (If)
\
r'\
53L.
up
CR];
H
j L (vii wayManama
Ala/957 Suki/ace Jqf'. W
q;
,._'>. uJ
0 e tar(7.) :. me vs [.aH  5;}
,k _
ZWVeckvm W
yilvKQ
Applied Mathematics 2811b  University of Western Ontario
Selected Solutions for Assignment 2, 2015
A Suppose that the set is a VS. Then L(0) = 0 so f = 0 since a linear operator sends the zero vector to
a zero vector. Conversely suppose that f = 0.
Then
Topic 7. Arrays
1. One dimensional Array.
Arrays are very important in numerical computations. They are defined by
double a[10] ;
This means that we defined a onedimensional array containing ten numbers of type double, i.e. a0, a1, ,a9
so that a0 is plac
Topic 03. Using Functions and Header Files
1. Functions
/ Calculation Factorial: n!
long fact(int n)
cfw_
long i,f;
f = 1;
for (i = 1; i <= n; i+)
f *= i;
return f;
/ Calculation Factorial: n!
/ Recursion function (call itself)
long factR (int n)
cfw_
if
Lesson 1
Page 1 of 7
1.1 A Sample Program
Every program in C+ must have a function naimed main, which contains a number of statements
enclosed in braces cfw_ . Each statement can extend to more than one line, but must end with a semicolon.
Comments must b
Topic 17. ODE (continuous)
1. Taylor Series Method of Higher Order
Assume that our solutions function x is represented by its
Taylor series:
x(t h) x(t ) hx ' (t )
1 2 '
1
1
h x (t ) h 3 x ' (t ) . h m x ( m ) (t ) .
2!
3!
m!
(1)
For numerical purposes,
Topic 18. C+ File IO
1. Stream Classes
There are three C+ classes basis form for the file input/output:
istream class for input
ostream class for output
iostream class for input/output
These are referred to as stream classes.
There are four class varia
Topic 20. Templates
1.
Ternary conditional operator?:
We have already met the ternary conditional operator? :,
The expression
a?x:y
meaning "if a then x else y".
This enables very concise conditional expressions and
statements to be written.
For example,
Topic 15 Complex Numbers Class
Let us consider the design of a simple class which will involve little data and
several functions. A complex number consists of the real and imaginary part
as the data so a complex number class must have two double numbers a
Topic 12. Classes
1. Introduction to classes
C+ was designed by Bjarne Stroustrup of AT&T Bell Laboratories during
the 1980s as an extended version of C. Its most significant feature is the class.
C+ was originally named C with Classes. A class is an abst
Topic 14. Main Parts of a Class
Let us now consider in more details the basic items of a class
Private and Public
Data
Constructors
Destructors
Member functions
Friends
Operator overloading
1. Private and Public
Usually data is declared private so
Topic 16. Ordinary Differential Equations
1. Taylor Series Method
The numerical method described in this section does not have the
utmost generality, but it is natural and capable of high precision. Its
principle is to represent the solution of a differen
Topic 13. Grid Program
Let us look at a more elaborate example of a class that defines a grid in twodimensions. Thus for each point we must have the x and y coordinates and the index;
each of these is stored in an array and since we do not know how big a
Topic 10 C+ Keywords and Preprocessor Directives
1. C+ Keywords
Keywords are reserved to the compiler for use by the language.
You cannot define classes, variables, or functions that have these keywords as
their names. The list is a bit arbitrary, as some
Topic 04. Control and Iterative Statements
1. The if Statement
The if statement is used to implement a decision.
It has two parts: a test and a body.
Syntax:
if (condition) statement;
Here condition is an integer expression and statement is any executable
Topic 06. Advanced Control Flow. Simulations
Goals
To be able to program loops with do/while statements
To implement approximations and simulations
1. The do Loop
Sometimes you want to execute the body of a loop at least
once and perform the loop test aft
Topic 8. Memory and Pointers
1. Pointers
An object variable contains an object, but a pointer specifies where an
object is located.
Pointers are one of the C+ most important features.
Pointers can refer to objects that are dynamically allocated whenever t