Implement the Bisection Method as a simple MATLAB function to solve the problem
ID: 3851341 • Letter: I
Question
Implement the Bisection Method as a simple MATLAB function to solve the problem below to four significant figures. Thanks.
8.18 Figure P8.18a shows a uniform beam subject to a linearly in creasing distributed load. The equation for the resulting elastic curve is (see Fig. P8.18b) wo 2 3 (P8.18) L x) 120 EIL Use bisection to determine the point of maximum deflection (that is, the value of x where dy/dx 0). Then substitute this value into Eq. (P8.18) to determine the value of the maximum deflection. Use the following parameter values in your computation: L E 600 cm, 50,000 kN/cm I 30,000 cm and wo 2.5 kN/cm Figure P8.18 (a) (x 0, y 0) x (b)Explanation / Answer
main.m
clear all; clf
% Convert all constants to MKS
L = 6;
E = 50000000;
I = 0.0003;
w0 = 250;
deltax = 0.1;
% I use symbolic expression, to differentiate later
syms x
y(x) = (w0/(120*E*I*L))*(-x^5 + 2*(L^2)*x^3 - (L^4)*x);
% Slope
theta = diff(y,x)
% Moment
M = diff(theta,x)
% I choose to take the derivative of the precedent function, but it can be
% done this other way: M = diff(y,2)
% Shear
V = diff(M,x)
% I choose to take the derivative of the precedent function, but it can be
% done this other way: V = diff(y,3)
% Loading
w = -diff(V,x)
% I choose to take the derivative of the precedent function, but it can be
% done this other way: w = -diff(y,4)
%Plotting y, theta, M, V, w vs x in stacked plots
figure(1)
subplot(5,1,1) %subplot(n_rows,n_columns,position)
ezplot(y,[-10 10])
axis square
xlabel('x')
ylabel('y(x)')
subplot(5,1,2) %subplot(n_rows,n_columns,position)
ezplot(theta,[-10 10])
axis square
xlabel('x')
ylabel('theta(x)')
subplot(5,1,3) %subplot(n_rows,n_columns,position)
ezplot(M,[-10 10])
axis square
xlabel('x')
ylabel('M(x)')
subplot(5,1,4) %subplot(n_rows,n_columns,position)
ezplot(V,[-10 10])
axis square
xlabel('x')
ylabel('V(x)')
subplot(5,1,5) %subplot(n_rows,n_columns,position)
ezplot(w,[-10 10])
axis square
xlabel('x')
ylabel('w(x)')
% Save plot
saveas(figure(1),'plots/fig1.png')