The following differential equation results from a force balance for a beam with a uniform loading,
$0 = EI \frac{d^2y}{dx^2} - \frac{wLx}{2} + \frac{wx^2}{2}$
where x = distance along the beam (m), y = deflection (m), L = length (m), E = modulus of
elasticity (N/m²), I = moment of inertia (m²), and w = uniform load (N/m).
(a) Convert this differential equation to an equivalent system of simultaneous algebraic equations
using a centereddifference approximation for the second derivative.
(b) Develop a function to solve these equations from x = 0 to L and return the resulting distances
and deflections. The first line of your function should be
function [x, y] = YourLastName_beam (E, I, w, y0, yL, L, dx)
(c) Develop a script that invokes this function and then plots the results.
(d) Test your script for the following parameters: L = 3 m, ?x = 0.2 m, E = 250 x 10? N/m², I = 3 x
10?? m², w = 22,500 N/m, y(0) = 0, and y(3) = 0.