Achievable logoAchievable logo
FE Mechanical
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
1. Mathematics
1.1 Analytic geometry
1.2 Calculus
1.3 Ordinary differential equations
1.4 Numerical methods
2. Probability & statistics
3. Ethics & professional practice
4. Engineering economics
5. Electricity & magnetism
6. Statics
7. sandbox
Example
Achievable logoAchievable logo
1.4 Numerical methods
FE Mechanical
1. Mathematics
Our FE Mechanical course is currently in development and is a work-in-progress.

Numerical methods

8 min read
Font
Discuss
Share
Feedback

While second-degree polynomials can be solved through factoring, completing the square, or applying the quadratic formula, straightforward analytical methods for cubic and higher-order equations exist only in a narrow set of cases. However, such higher-order equations are typical in engineering applications, so finding approximate solutions to the equations would be useful.

This module examines three fundamental areas of numerical methods: root finding using Newton’s method, numerical integration techniques, and numerical solutions of ordinary differential equations.

Root extraction: Newton’s method

Newton’s method is a particular form of fixed-point iteration. The goal is to find a value x such that f(x)=0.

All fixed-point techniques require a starting point. Preferably, the starting point will be close to the actual root. And, while Newton’s method converges quickly, it requires the function to be continuously differentiable.

Given an initial guess of x0​, the next estimate for the solution to f(x)=0 is:

xi+1​=xi​−[dxdf(x)​f(x)​]x=xi​​

or equivalently:

xi+1​=xi​−f′(xi​)f(xi​)​

Newton’s method can be understood geometrically as follows:

  1. Start with an initial guess x0​
  2. Draw the tangent line to the curve y=f(x) at the point (x0​,f(x0​))
  3. Find where this tangent line intersects the x-axis; this intersection is x1​
  4. Repeat the process using x1​ as the new starting point

The tangent line at xi​ has slope f′(xi​) and passes through (xi​,f(xi​)). Setting y=0 and solving for x gives the next approximation xi+1​.

At each iteration (i=0,1,2, etc.), the method estimates the root. The maximum error is determined by looking at how much the estimate changes after each iteration. If the change between the previous and current estimates (representing the magnitude of error in the estimate) is too large, the current estimate is used as the independent variable for the subsequent iteration.

Convergence criterion:

∣xi+1​−xi​∣<ϵ

where ϵ is a predetermined tolerance.

Properties of Newton’s method:

  • Quadratic convergence: when it converges, Newton’s method typically doubles the number of correct digits with each iteration.
  • Requires differentiability: the function must be continuously differentiable.
  • Sensitive to starting point: poor initial guesses may lead to divergence or convergence to an unintended root.

Numerical integration

Numerical integration (also called numerical quadrature) is the process of approximating the value of a definite integral when an analytical solution is difficult or impossible to obtain. We present three common methods: Euler’s rule, the trapezoidal rule, and Simpson’s rule.

General setup

For all numerical integration methods, we divide the interval [a,b] into n subintervals of equal width:

Δx=nb−a​

The partition points are:

xk​=a+kΔx,k=0,1,2,…,n

Euler’s rule (left endpoint rule)

Euler’s rule is the simplest numerical integration technique. It approximates the integral by summing rectangles whose heights are determined by the function value at the left endpoint of each subinterval.

∫ab​f(x)dx≈Δxk=0∑n−1​f(a+kΔx)

Geometric interpretation: Each rectangle has width Δx and height f(xk​), where xk​ is the left endpoint of the kth subinterval.

Characteristics:

  • Simplest method to implement.
  • Generally less accurate than trapezoidal or Simpson’s rule.
  • Error is proportional to Δx (first-order accuracy).

Trapezoidal rule

The trapezoidal rule improves upon Euler’s rule by approximating the area under the curve using trapezoids instead of rectangles.

Formula for n=1 (single trapezoid):

∫ab​f(x)dx≈Δx[2f(a)+f(b)​]

Formula for n>1 (multiple trapezoids):

∫ab​f(x)dx≈2Δx​[f(a)+2k=1∑n−1​f(a+kΔx)+f(b)]

Alternative notation:

A=2d​(h0​+2i=1∑n−1​hi​+hn​)

where d is the width of each cell and hi​ represents the function values (heights) at each partition point.

Geometric interpretation: Each trapezoid has parallel sides of lengths f(xk​) and f(xk+1​), with width Δx. The area of each trapezoid is 2Δx​[f(xk​)+f(xk+1​)].

Sidenote
When to use the trapezoidal rule

Areas of sections with irregular boundaries cannot be determined precisely, so approximation methods must be used. If the irregular side can be divided into a series of n cells of equal width, and if the irregular side of each cell is fairly straight, the trapezoidal rule is appropriate.

Characteristics:

  • More accurate than Euler’s rule.
  • Error is proportional to (Δx)2 (second-order accuracy).
  • Exact for linear functions.

Simpson’s rule (parabolic rule)

Simpson’s rule achieves higher accuracy by approximating the function with parabolic arcs instead of straight lines.

Formula for n=2 (single parabola):

∫ab​f(x)dx≈(6b−a​)[f(a)+4f(2a+b​)+f(b)]

Formula for general n (must be even):

∫ab​f(x)dx≈3Δx​​f(a)+2k=2,4,6,…​∑n−2​f(a+kΔx)+4k=1,3,5,…​∑n−1​f(a+kΔx)+f(b)​

where:

Δx=nb−a​

Alternative notation:

A=3d​​h0​+2i eveni=2​∑n−2​hi​+4i oddi=1​∑n−1​hi​+hn​​

Important requirement: the value of n must be even to use Simpson’s rule.

Geometric interpretation: Simpson’s rule fits a parabola through each consecutive set of three points and integrates the parabola exactly.

Sidenote
When to use Simpson's rule

If the irregular side of each cell is curved (parabolic), Simpson’s rule should be used instead of the trapezoidal rule.

Characteristics:

  • More accurate than both Euler’s rule and the trapezoidal rule.
  • Error is proportional to (Δx)4 (fourth-order accuracy).
  • Exact for polynomials of degree 3 or less.

Numerical solutions of ordinary differential equations

Many differential equations arising in engineering and science cannot be solved analytically. In such cases, numerical methods provide approximate solutions at discrete points.

Consider a first-order ordinary differential equation of the form:

dtdx​=f(x,t),x(0)=x0​

The goal is to find approximate values of x(t) at discrete time points tk​=kΔt.

Euler’s approximation

Euler’s approximation (also called Euler’s method or forward Euler method) is the simplest method for numerically solving ordinary differential equations. It estimates the value of a function given the value and slope of the function at an adjacent location.

Given the differential equation

dtd​x(t)=f(x,t),

various points along the solution x(t) may be approximated as:

x[(k+1)Δt]≅x(kΔt)+Δt⋅f[x(kΔt),kΔt]

x[(k+1)Δt]≅x(kΔt)+Δt⋅f[x(kΔt)]

xk+1​=xk​+Δt⋅dtdxk​​

xk+1​=xk​+Δt⋅f(xk​,tk​)

Geometric interpretation: The simplicity of the concept is illustrated by writing Euler’s approximation in terms of the traditional two-dimensional x-y coordinate system:

y(x2​)=y(x1​)+(x2​−x1​)y′(x1​)

This formula says: starting from a known point (x1​,y(x1​)), move along the tangent line (with slope y′(x1​)) to estimate the function value at a nearby point x2​.

Applicability: Euler’s approximation applies to a differential equation of the form:

f(x,t)=dtdx​,x(0)=x0​

The model applies to a general time kΔt, and it applies when f(x)=dx/dt and can be expressed recursively.

As long as the derivative can be evaluated, Euler’s method can be used to predict the value of any function whose values are limited to discrete, sequential points in time or space (e.g., a difference equation).

Euler’s approximation for ordinary differential equations provides a straightforward method for obtaining numerical solutions when analytical methods fail. While it is exact for linear systems, care must be taken with nonlinear systems where error accumulates.

These numerical methods form the foundation for more advanced computational techniques used throughout engineering, physics, and applied mathematics. Modern software packages implement sophisticated versions of these algorithms, but understanding the basic principles remains essential for proper application and interpretation of results.

Root extraction: Newton’s method

  • Iterative root-finding: xi+1​=xi​−f′(xi​)f(xi​)​
  • Requires continuously differentiable function
  • Properties:
    • Quadratic convergence (rapid error reduction)
    • Sensitive to initial guess; may diverge or find wrong root

Numerical integration

  • Approximates definite integrals when analytical solutions are difficult
  • Interval [a,b] divided into n equal subintervals: Δx=nb−a​

Euler’s rule (left endpoint rule)

  • Approximates area using rectangles at left endpoints
  • Formula: ∫ab​f(x)dx≈Δx∑k=0n−1​f(a+kΔx)
  • First-order accuracy; error ∝Δx

Trapezoidal rule

  • Approximates area using trapezoids between points
  • Formula for n>1: ∫ab​f(x)dx≈2Δx​[f(a)+2∑k=1n−1​f(a+kΔx)+f(b)]
  • Second-order accuracy; error ∝(Δx)2
  • Exact for linear functions

Simpson’s rule (parabolic rule)

  • Approximates area using parabolic arcs (requires even n)
  • Formula: ∫ab​f(x)dx≈3Δx​[f(a)+2∑k=2,4,…n−2​f(a+kΔx)+4∑k=1,3,…n−1​f(a+kΔx)+f(b)]
  • Fourth-order accuracy; error ∝(Δx)4
  • Exact for polynomials of degree ≤3

Numerical Solutions of Ordinary Differential Equations

  • Approximates solutions at discrete points when analytic solutions are unavailable
  • General form: dtdx​=f(x,t), x(0)=x0​

Euler’s approximation (for ODEs)

  • Recursive formula: xk+1​=xk​+Δt⋅f(xk​,tk​)
  • Moves along tangent from known point to estimate next value
  • Simple, but error accumulates for nonlinear systems; exact for linear systems
Previous
Next  | 2.1 Sets & counting
All rights reserved ©2016 - 2026 Achievable, Inc.

Numerical methods

While second-degree polynomials can be solved through factoring, completing the square, or applying the quadratic formula, straightforward analytical methods for cubic and higher-order equations exist only in a narrow set of cases. However, such higher-order equations are typical in engineering applications, so finding approximate solutions to the equations would be useful.

This module examines three fundamental areas of numerical methods: root finding using Newton’s method, numerical integration techniques, and numerical solutions of ordinary differential equations.

Root extraction: Newton’s method

Newton’s method is a particular form of fixed-point iteration. The goal is to find a value x such that f(x)=0.

All fixed-point techniques require a starting point. Preferably, the starting point will be close to the actual root. And, while Newton’s method converges quickly, it requires the function to be continuously differentiable.

Given an initial guess of x0​, the next estimate for the solution to f(x)=0 is:

xi+1​=xi​−[dxdf(x)​f(x)​]x=xi​​

or equivalently:

xi+1​=xi​−f′(xi​)f(xi​)​

Newton’s method can be understood geometrically as follows:

  1. Start with an initial guess x0​
  2. Draw the tangent line to the curve y=f(x) at the point (x0​,f(x0​))
  3. Find where this tangent line intersects the x-axis; this intersection is x1​
  4. Repeat the process using x1​ as the new starting point

The tangent line at xi​ has slope f′(xi​) and passes through (xi​,f(xi​)). Setting y=0 and solving for x gives the next approximation xi+1​.

At each iteration (i=0,1,2, etc.), the method estimates the root. The maximum error is determined by looking at how much the estimate changes after each iteration. If the change between the previous and current estimates (representing the magnitude of error in the estimate) is too large, the current estimate is used as the independent variable for the subsequent iteration.

Convergence criterion:

∣xi+1​−xi​∣<ϵ

where ϵ is a predetermined tolerance.

Properties of Newton’s method:

  • Quadratic convergence: when it converges, Newton’s method typically doubles the number of correct digits with each iteration.
  • Requires differentiability: the function must be continuously differentiable.
  • Sensitive to starting point: poor initial guesses may lead to divergence or convergence to an unintended root.

Numerical integration

Numerical integration (also called numerical quadrature) is the process of approximating the value of a definite integral when an analytical solution is difficult or impossible to obtain. We present three common methods: Euler’s rule, the trapezoidal rule, and Simpson’s rule.

General setup

For all numerical integration methods, we divide the interval [a,b] into n subintervals of equal width:

Δx=nb−a​

The partition points are:

xk​=a+kΔx,k=0,1,2,…,n

Euler’s rule (left endpoint rule)

Euler’s rule is the simplest numerical integration technique. It approximates the integral by summing rectangles whose heights are determined by the function value at the left endpoint of each subinterval.

∫ab​f(x)dx≈Δxk=0∑n−1​f(a+kΔx)

Geometric interpretation: Each rectangle has width Δx and height f(xk​), where xk​ is the left endpoint of the kth subinterval.

Characteristics:

  • Simplest method to implement.
  • Generally less accurate than trapezoidal or Simpson’s rule.
  • Error is proportional to Δx (first-order accuracy).

Trapezoidal rule

The trapezoidal rule improves upon Euler’s rule by approximating the area under the curve using trapezoids instead of rectangles.

Formula for n=1 (single trapezoid):

∫ab​f(x)dx≈Δx[2f(a)+f(b)​]

Formula for n>1 (multiple trapezoids):

∫ab​f(x)dx≈2Δx​[f(a)+2k=1∑n−1​f(a+kΔx)+f(b)]

Alternative notation:

A=2d​(h0​+2i=1∑n−1​hi​+hn​)

where d is the width of each cell and hi​ represents the function values (heights) at each partition point.

Geometric interpretation: Each trapezoid has parallel sides of lengths f(xk​) and f(xk+1​), with width Δx. The area of each trapezoid is 2Δx​[f(xk​)+f(xk+1​)].

Sidenote
When to use the trapezoidal rule

Areas of sections with irregular boundaries cannot be determined precisely, so approximation methods must be used. If the irregular side can be divided into a series of n cells of equal width, and if the irregular side of each cell is fairly straight, the trapezoidal rule is appropriate.

Characteristics:

  • More accurate than Euler’s rule.
  • Error is proportional to (Δx)2 (second-order accuracy).
  • Exact for linear functions.

Simpson’s rule (parabolic rule)

Simpson’s rule achieves higher accuracy by approximating the function with parabolic arcs instead of straight lines.

Formula for n=2 (single parabola):

∫ab​f(x)dx≈(6b−a​)[f(a)+4f(2a+b​)+f(b)]

Formula for general n (must be even):

∫ab​f(x)dx≈3Δx​​f(a)+2k=2,4,6,…​∑n−2​f(a+kΔx)+4k=1,3,5,…​∑n−1​f(a+kΔx)+f(b)​

where:

Δx=nb−a​

Alternative notation:

A=3d​​h0​+2i eveni=2​∑n−2​hi​+4i oddi=1​∑n−1​hi​+hn​​

Important requirement: the value of n must be even to use Simpson’s rule.

Geometric interpretation: Simpson’s rule fits a parabola through each consecutive set of three points and integrates the parabola exactly.

Sidenote
When to use Simpson's rule

If the irregular side of each cell is curved (parabolic), Simpson’s rule should be used instead of the trapezoidal rule.

Characteristics:

  • More accurate than both Euler’s rule and the trapezoidal rule.
  • Error is proportional to (Δx)4 (fourth-order accuracy).
  • Exact for polynomials of degree 3 or less.

Numerical solutions of ordinary differential equations

Many differential equations arising in engineering and science cannot be solved analytically. In such cases, numerical methods provide approximate solutions at discrete points.

Consider a first-order ordinary differential equation of the form:

dtdx​=f(x,t),x(0)=x0​

The goal is to find approximate values of x(t) at discrete time points tk​=kΔt.

Euler’s approximation

Euler’s approximation (also called Euler’s method or forward Euler method) is the simplest method for numerically solving ordinary differential equations. It estimates the value of a function given the value and slope of the function at an adjacent location.

Given the differential equation

dtd​x(t)=f(x,t),

various points along the solution x(t) may be approximated as:

x[(k+1)Δt]≅x(kΔt)+Δt⋅f[x(kΔt),kΔt]

x[(k+1)Δt]≅x(kΔt)+Δt⋅f[x(kΔt)]

xk+1​=xk​+Δt⋅dtdxk​​

xk+1​=xk​+Δt⋅f(xk​,tk​)

Geometric interpretation: The simplicity of the concept is illustrated by writing Euler’s approximation in terms of the traditional two-dimensional x-y coordinate system:

y(x2​)=y(x1​)+(x2​−x1​)y′(x1​)

This formula says: starting from a known point (x1​,y(x1​)), move along the tangent line (with slope y′(x1​)) to estimate the function value at a nearby point x2​.

Applicability: Euler’s approximation applies to a differential equation of the form:

f(x,t)=dtdx​,x(0)=x0​

The model applies to a general time kΔt, and it applies when f(x)=dx/dt and can be expressed recursively.

As long as the derivative can be evaluated, Euler’s method can be used to predict the value of any function whose values are limited to discrete, sequential points in time or space (e.g., a difference equation).

Euler’s approximation for ordinary differential equations provides a straightforward method for obtaining numerical solutions when analytical methods fail. While it is exact for linear systems, care must be taken with nonlinear systems where error accumulates.

These numerical methods form the foundation for more advanced computational techniques used throughout engineering, physics, and applied mathematics. Modern software packages implement sophisticated versions of these algorithms, but understanding the basic principles remains essential for proper application and interpretation of results.

Key points

Root extraction: Newton’s method

  • Iterative root-finding: xi+1​=xi​−f′(xi​)f(xi​)​
  • Requires continuously differentiable function
  • Properties:
    • Quadratic convergence (rapid error reduction)
    • Sensitive to initial guess; may diverge or find wrong root

Numerical integration

  • Approximates definite integrals when analytical solutions are difficult
  • Interval [a,b] divided into n equal subintervals: Δx=nb−a​

Euler’s rule (left endpoint rule)

  • Approximates area using rectangles at left endpoints
  • Formula: ∫ab​f(x)dx≈Δx∑k=0n−1​f(a+kΔx)
  • First-order accuracy; error ∝Δx

Trapezoidal rule

  • Approximates area using trapezoids between points
  • Formula for n>1: ∫ab​f(x)dx≈2Δx​[f(a)+2∑k=1n−1​f(a+kΔx)+f(b)]
  • Second-order accuracy; error ∝(Δx)2
  • Exact for linear functions

Simpson’s rule (parabolic rule)

  • Approximates area using parabolic arcs (requires even n)
  • Formula: ∫ab​f(x)dx≈3Δx​[f(a)+2∑k=2,4,…n−2​f(a+kΔx)+4∑k=1,3,…n−1​f(a+kΔx)+f(b)]
  • Fourth-order accuracy; error ∝(Δx)4
  • Exact for polynomials of degree ≤3

Numerical Solutions of Ordinary Differential Equations

  • Approximates solutions at discrete points when analytic solutions are unavailable
  • General form: dtdx​=f(x,t), x(0)=x0​

Euler’s approximation (for ODEs)

  • Recursive formula: xk+1​=xk​+Δt⋅f(xk​,tk​)
  • Moves along tangent from known point to estimate next value
  • Simple, but error accumulates for nonlinear systems; exact for linear systems

More from Mathematics

  • Ordinary differential equations