0% found this document useful (0 votes)
22 views20 pages

Euler's Method

what is euler's method

Uploaded by

maryjane.mlpz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views20 pages

Euler's Method

what is euler's method

Uploaded by

maryjane.mlpz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Introduction to Numerical

Methods
Engr. Diane H. Villanueva
Developing a 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. In a very general sense, it can be
represented as a functional relationship of the form

Eq 1.1
Developing a Mathematical Model

• dependent variable is a characteristic that reflects the behavior or


state of the system;
• independent variables are usually dimensions, such as time and
space, along which the systems behavior is being determined;
• parameters are reflective of the systems properties or
composition;
• forcing functions are external influences acting upon the system
Developing a Mathematical Model
Newton formulated his second law of motion, which states that the
time rate of change of momentum of a body is equal to the resultant
force acting on it. The mathematical expression, or model, of the
second law is the well-known equation

Eq 1.2

where F = net force acting on the body (N, or kg-m/s2), m = mass of


the object (kg), and a = its acceleration (m/s2)
Developing a Mathematical Model
The second law can be recast in the format of Eq. (1.1) by dividing
both sides by m to give

Eq 1.3

Eq 1.4
Developing a Mathematical Model
Newtons second law can be used to determine the
terminal velocity of a free-falling body near the
earth’s surface. Our falling body will be a
parachutist.

For a body falling within the vicinity of the earth, the


net force is composed of two opposing forces:
1. the downward pull of gravity FD and
2. the upward force of air resistance FU
Developing a Mathematical Model
Eq 1.5

If the downward force is assigned a positive sign,


the second law can be used to formulate the force
due to gravity as
Eq 1.6
where g = the gravitational constant, or the
acceleration due to gravity, which is approximately
equal to 9.81 m/s2.
Developing a Mathematical Model
Air resistance can be formulated in a variety of
ways. A simple approach is to assume that it is
linearly proportional to velocity and acts in an
upward direction, as in
Eq 1.7

where c = a proportionality constant called the


drag coefficient (kg/s)
Developing a Mathematical Model
The net force is the difference between the downward and upward
force. Therefore, Eqs. (1.4) through (1.7) can be combined to yield
Eq 1.4 Eq 1.5 Eq 1.6 Eq 1.7
𝑑𝑣 𝐹 𝐹 =𝐹 +𝐹 𝐹 = 𝑚𝑔 𝐹 = −𝑐𝑣
=
𝑑𝑡 𝑚

Eq 1.8

Eq 1.9
Developing a Mathematical Model
Equation (1.9) is a model that relates the acceleration of a falling
object to the forces acting on it. It is a differential equation because
it is written in terms of the differential rate of change (dv/dt) of the
variable that we are interested in predicting.
Developing a Mathematical Model
However, in contrast to the solution of Newton’s second law in Eq.
(1.3), the exact solution of Eq. (1.9) for the velocity of the falling
parachutist cannot be obtained using simple algebraic
manipulation. Rather, more advanced techniques, such as those of
calculus, must be applied to obtain an exact or analytical solution.
For example, if the parachutist is initially at rest (y = 0 at t = 0),
calculus can be used to solve Eq. (1.9) for
Eq. 1.10
Analytical (Exact) Solution
Example 1.1 A parachutist of mass 68.1 kg jumps out of a stationary
hot air balloon. Use Eq. 1.10 to compute velocity prior to opening
the chute. The drag coefficient is equal to 12.5 kg/s.
Eq. 1.10
Analytical (Exact) Solution
Example 1.1 A parachutist of mass 68.1 kg jumps out of a stationary
hot air balloon. Use Eq. 1.10 to compute velocity prior to opening
the chute. The drag coefficient is equal to 12.5 kg/s.
Eq. 1.10

Solution:
Analytical (Exact) Solution

A velocity of 44.92 m/s is attained


after 10 s.
After a sufficiently long time, a
constant velocity, called the
terminal velocity, of 53.44 m/s is
reached.
This velocity is constant because,
eventually, the force of gravity will
be in balance with the air
resistance. Thus, the net force is
zero and acceleration has
ceased.
Numerical Solution
the mathematical problem is reformulated so it can be solved by
arithmetic operations.
Eq. 1.9

finite divided difference


Eq. 1.11

Eq. 1.12
Numerical Solution
Rearranging Eq. 1.12
Eq. 1.13

Thus, the differential equation has been transformed into an


equation that can be used to determine the velocity algebraically at
ti+1 using the slope and previous values of v and t.

New value = old value + slope x step size


Note that this approach is formally called Euler’s method.
Numerical Solution
Example 1.2 Perform the same computation as in Example 1.1 but
use Eq. 1.13 to compute the velocity. Employ a step size of 2 s for
the calculation.
Numerical Solution
Example 1.2 Perform the same computation as in Example 1.1 but
use Eq. 1.13 to compute the velocity. Employ a step size of 2 s for
the calculation.

Solution:
ti = 0, v(ti) = 0 ;
ti+1 = 2, v(ti+1) = 19.62 m/s
ti+2 = 2, v(ti+2) = 32.04 m/s
Numerical Solution
Seatwork 1
As depicted in the figure, an RLC circuit (a) If the initial values are i(0) = 0 and
consists of three elements: a resistor (R), q(0) = 1 C, use Euler’s method to
and inductor (L) and a capacitor (C). The solve this pair of differential
flow of current across each element equations from t = 0 to 0.1 s using a
induces a voltage drop. step size of Δt = 0.01 s. Employ the
Kirchhoffs second voltage law states that following parameters for your
the algebraic sum of these voltage drops calculation: R = 200 Ω, L = 5 H, and C
around a closed circuit is zero, = 10–4 F.
(b) Develop a plot of i and q versus t.

where i = current, R = resistance, L =


inductance, t = time, q = charge, and C =
capacitance. In addition, the current is
related to charge as in

You might also like