You are on page 1of 1

LBYCVN1 – MATLAB PROBLEM NO.

1 – Roots of Nonlinear Equations


Background:
Finding the roots of nonlinear equations involves an iterative and repetitive procedure
which is conveniently solved with the use of a computer. There are various methods for solving
the roots of an equation of the form: F(x) = 0. Set-up the nonlinear equations of the form F(x) = 0
for each application and solve for the roots of the equations. You may use the Matlab functions or
solvers for solving nonlinear equations. In the problems below, the function is used to obtain the
normal depth in No. 1 and the location and maximum deflection of the beam in No. 2.
(1) If ID Number ends ODD. Application No. 1: Hydraulics : Determining d, the normal depth
of flow of a rectangular channel given the width of the channel, b = 15 m , the flow rate , Q
= 22 cubic meters per sec, the channel slope, S = 0.00025, and the roughness coefficient n =
0.013, using the following equation:
1
Q = A R 2 / 3 S 1/ 2
n
• Plot the nonlinear equation for solving d.
• Solve for d for given values of b, Q, n and S.
• Solve for d if b varies from 10 m to 40 m at increment of 5. Plot the nonlinear equations
in one figure for comparison. Plot d vs b for constant Q. Discuss the effect of b.
• Prepare a report presenting the inputs & outputs with discussion and the scripts as
appendix.

(2) If ID Number ends EVEN. Application No. 2: Strength of Materials: Determining the
location of the maximum deflection of a beam between supports using the Double Integration
Method:The moment equation, y = f(x) may be written using singularity functions and the
maximum deflection of the beam (Ym) between supports is located at Xm where the slope of
the elastic curve is horizontal.

d 2 y M ( x)
=
dx2 EI
P = 10 kN
Rectangular beam section
W= 4 kN/m P = 10 kN b = 20 cm, h = 40 cm
E = 100Gpa
P = 10 kN
A 3.0 m B 5.0 m C

• Derive the equation of the elastic curve. Note there will be two equations for AB & BC.
• Plot the nonlinear equation(s) for solving the deflection y at any x.
• Solve for Xm and Ym for the given values.
• Solve for Xm and Ym, if P varies from 0 kN to 20 kN at increment of 2. Plot the Ym, Xm
vs P. Discuss the effect of P.
• Prepare a report presenting the input & outputs with discussion and the scripts as
appendix.

You might also like