Professional Documents
Culture Documents
Lecture 1 - Chapter - 01 - Numercial Methods
Lecture 1 - Chapter - 01 - Numercial Methods
with MATLAB®
for Engineers and Scientists
4th Edition
Steven C. Chapra
©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.
Part 1
Chapter 1
Mathematical Modeling,
Numerical Methods, and
Problem Solving
©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.
Chapter Objectives
Learning how mathematical models can be formulated on
the basis of scientific principles to simulate the behavior of
a simple physical system.
Understanding how numerical methods afford a means to
generalize solutions in a manner that can be implemented
on a digital computer.
Understanding the different types of conservation laws that
lie beneath the models used in the various engineering
disciplines and appreciating the difference between steady-
state and dynamic solutions of these models.
Learning about the different types of numerical methods we
will cover in this book.
©McGraw‐Hill Education.
A Simple Mathematical Model
A mathematical model can be broadly defined
as a formulation or equation that expresses
the essential features of a physical system or
process in mathematical terms.
©McGraw‐Hill Education.
Model Function
Dependent independent forcing
𝑓 , parameters,
variable variables functions
©McGraw‐Hill Education.
Numerical Modeling
Some system models will be given as implicit functions
or as differential equations - these can be solved either
using analytical methods or numerical methods.
Example - the bungee jumper velocity equation from
before is the analytical solution to the differential
equation
𝑑 2
i 1
i 1
©McGraw‐Hill Education.
Euler’s Method
Substituting the finite difference into the
differential equation gives
𝑑 2
i 1 𝑖 𝑑 2
i 1 𝑖
Solve for
𝑑 2
i 1 𝑖 𝑖 i 1 𝑖
©McGraw‐Hill Education.
Numerical Results
Applying Euler’s method in 2 s intervals yields:
©McGraw‐Hill Education.
Part 1
Chapter 2
MATLAB Fundamentals
©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.
Matlab User Interface
©McGraw‐Hill Education.
Calculator Mode
The MATLAB command widow can be used
as a calculator where you can type in
commands line by line. Whenever a
calculation is performed, MATLAB will assign
the result to the built-in variable ans
Example:
>> 55/11
ans =
5
©McGraw‐Hill Education.
MATLAB Syntax
• x=3^2/3+2*4/2^3
• Evaluate exponentials first:
• x=9/3+2*4/8
• Next perform multiplication and division:
• x=3+1
• Finally, perform addition and subtraction:
• x=4
Arithmetric Operators