Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Homework 2

Answer all questions. Show all calculations, define all necessary terms, and show reasoning to receive credit. Absolutely no credit will be given for guessing! No handwritten/scanned work will be accepted. All work must be typed in whatever preferred format and all implemented MATLAB code must be included in your solutions. Submit your homework at the Moodle page .

Problem 1: Uniform Beam Subject to Linearly Increasing Load. (Chapra, Problem 2.21)

Figure P2.21a shows a uniform beam subject to a linearly increasing distributed load. As depicted in Fig. P2.21b, deflection y [m] can be computed with

y = (x 5 + 2L2x 3 L4 x)

where E = the modulus of elasticity and I = the moment of intertia (m4). Employ this equation and calculus to generate MATLAB plots of the following quantities versus distance along the beam:

a.   displacement (y),

b.   slope [q(x) = dy / dx],

c.   moment [M(x) = EId2y/dx2],

d.   shear [ V (x) = EId3y/dx3], and

e.   loading [w(x) = -EId4y/dx4].

Figure P2.21

Use the following parameters for your computation: L = 600 cm, E = 50,000 kN/cm2, I = 30,000 cm4, w0 = 2.5kN/cm, and Dx = 10 cm (for the plots). Employ the subplot function to display all the plots vertically on the same page in the order (a) to (e). Include labels and use consistent MKS units when developing the plots.


Problem 2: Sine function, programming in MATLAB. (Chapra, Problem 3.5)

The sine function can be evaluated by the following infinite series:

sinx = x + ...

Create an M-file to implement this formula so that it computes and displays the values of sin x as each term in the series is added. In other words, compute and display in sequence the values for

sinx = x

sinx = x

sinx = x +

×

×

×

up to the order term of your choosing. For each of the preceding, compute and display the percent relative error as

%error = true series approximation × 100

true

As a test case, employ the program to compute sin(0.9) for up to and including eight termsthat is, up to

the term .

Problem 3: Cartesian vectors, programming in MATLAB. (Chapra, Problem 3.20)

A Cartesian vector can be thought of as representing magnitudes along the x-, y-, and z-axes multiplied by a unit vector (i, j, k). For such cases, the dot product of two of these vectors {a} and {b} corresponds to the product of their magnitudes and the cosine of the angle between their tails as in

{a}{b}= abcosθ

The cross product yields another vector, {c}= {a} × {b}, which is perpendicular to the plane defined by {a} and {b} such that its direction is specified by the right-hand rule. Develop and M-file function that is passed two such vectors and returns q, {c} and the magnitude of {c}, and generates a three-dimensional plot of the three vectors {a}, {b}, and {c} with their origins at zero. Use dashed lines for   {a} and {b} and a solid line for {c}. Test your function using the following cases:

a.     a = [ 6 4 2 ]; b = [ 2 6 4 ];

b.     a = [ 3 2 -6 ]; b = [ 4 -3 1];

c.     a = [ 2 -2 1 ]; b = [ 4 2 -4 ];

d.     a = [ -1 0 0 ]; b = [ 0 -1 0 ];