Homework 4
Course: ECI 212A (Winter 2025)
Dated: January 28, 2025
Due Date: February 9, 2025 (11:59 p.m.)
Instructions
The homeworks can be handwritten on engineering/A4-letter paper (use only one side)
or on your iPad or typeset using MS-Word or LATEX. Please upload your solutions for
Problems 1–5 on canvas (single PDF file).
Problem 1
Consider the following one-dimensional boundary-value problem:
u00 (x) + sin(x) = 0, x ∈ (0, π) (1a)
u(0) = 0, u0 (π) = 0. (1b)
(a) Derive the weak form.
(b) Consider the trial function uh (x) = φ1 (x)c1 + φ(x)c2 , where φ1 (x) and φ2 (x) are
linearly independent and satisfy φ1 (0) = 0 and φ2 (0) = 0. Obtain an approximate
solution to this problem using the Rayleigh-Ritz Galerkin method. Recall the dis-
crete system you have to solve is: Kc = f , where Kij = a(φi , φj ) and fi = `(φi ).
Solve the problem for the following two cases:
(i) Use φ1 (x) = x, φ2 (x) = x2 .
(ii) Use φ1 (x) = x, φ2 (x) = sin(x).
(c) Plot your numerical solution for cases (i) and (ii) over the range x ∈ [0, π], and
compare them to the exact solution on the same plot. Do you note anything striking
in the numerical solution obtained in case b(ii). If so, comment on the same.
Winter 2025 ECI 212A Instructor: N. Sukumar
Problem 2
Consider the functional
1
Π[ū] = a(ū, ū) − `(ū) (ū ∈ S),
Z2 1 Z 1
k(x)(ū0 )2 + c(x)ū2 dx,
a(ū, ū) = `(ū) = b(x)ū dx + hū(1),
0 0
where h is a constant and k(x), c(x) > 0 ∀x ∈ [0, 1] is assumed. Let ū = u + w ∈ S
be any admissible trial function and Φ() ≡ Π[u + w], where u is the exact solution
and w ∈ V is an arbitrary test or weighting function. The admissible trial space is:
S = {ū : ū ∈ C 0 (0, 1), ū(0) = 0} (here V = S).
(a) Show that extremizing the functional Π[ū] (dΦ()/dc=0 = 0) leads to the weak
form, i.e., a(u, w) = `(w) ∀w ∈ V, which was derived in class. In addition, show
that dΠ/dc0+ > 0 and dΠ/dc0− < 0, which indicates that Π[ū] attains a minimum
at Π[u] ( = 0).
[Hint: Expand Φ() ≡ Π[u + w] using the linearity and symmetry properties of
a(·, ·) and the linearity of `(·), and then take the derivative with respect to . The
assumption k, c > 0 needs to be used to show that dΦ/dc0+ > 0 and dΦ/dc0− < 0.
Equivalently, you can compute d2 Φ()/d2 and show that d2 Φ()/d2 c=0 > 0.]
(b) Consider a set of linearly independent basis functions {φi (x)}ni=1 , where φi (0) = 0 for
i = 1, 2, . . . , n, which are used to form a kinematically admissible Ritz approximate
solution: n
X
h
u (x) = φi (x)ci ∈ S.
i=1
If u (x) is directly substituted into the functional Π[ū] ≡ Π[uh ], and then Π[uh ] is
h
minimized with respect to the coefficients ci (partial derivatives with respect to ci
are set to zero), show that the expressions for the stiffness matrix K and the force
vector f that you obtain are identical to what was derived in class using the weak
form.
Problem 3
Consider the following one-dimensional boundary-value problem:
u00 (x) + 2δ(x − 1/4) = 0 in Ω = (0, 1) (2a)
u(0) = 0, u0 (1) = 2. (2b)
The differential equation in (4a) contains a Dirac-delta source term, and hence does not
make sense in the classical sense when u must be twice-differentiable. It must be viewed
as a distributional differential equation (δ(·) is a generalized function or distribution),
and corresponds to the body force being a point axial load for the 1D elasticity problem.
As was mentioned in the lecture, the corresponding weak form is meaningful.
Page 2
Winter 2025 ECI 212A Instructor: N. Sukumar
(a) Derive the weak form and then obtain an approximate solution to this problem using
the Rayleigh-Ritz Galerkin method, with the following choice for the basis functions:
φ1 (x) = x, φ2 (x) = x2 . (3)
(b) Derive the Rexact solution for the
R ∞ above BVP. The δ(x) function satisfies the prop-
∞
R = 1; (ii) −∞ f (x)δ(x − ξ) = f (ξ) when ξ ∈ R for a function
erties: (i) −∞ δ(x)
0
f ∈ C (R); (iii) δ(x − ξ) dx = H(x − ξ) + C, where H(x − ξ) is the step (discontin-
uous)
R function that is 0 for x < ξ and 1 for x > ξ, and C is a constant. In addition,
H(x − ξ) dx = < x − ξ > + C, where < x − ξ > is the continuous ramp function
that is 0 for x < ξ and x − ξ for x ≥ ξ. < · > is also known as the Macaulay bracket
and < x > = max(0, x).
(c) Compare the approximate solution to the exact solution over the range x ∈ [0, 1].
(d) What special features does the exact solution exhibit at x = 1/4? Does the approx-
imate solution exhibit the same? Why or why not?
Problem 4
Solve Problem 5.12 from the textbook (Fish and Belytschko).
Problem 5
Solve Problem 5.17 from the textbook (Fish and Belytschko).
Practice (Ungraded) Problem
A boundary-value problem is posed in Ω̄ = [0, 3]. If 2 linear-u elements are used in
the finite element discretization, with nodes located at x1 = 0, x2 = 1, x3 = 3, then
write down the expressions for the FE basis functions φ1 (x), φ2 (x) and φ3 (x). The FE
interpolant in the x-coordinate system is: uh (x) = φ1 (x)u1 + φ2 (x)u2 + φ3 (x)u3 . To
arrive at your answer, you have to use the isoparametric mapping over each element to
express ξ in terms of x to obtain φi ’s as a function of x.
Page 3