Submit both the Matlab code and results for the following questions Q1 Use Matla
ID: 3168348 • Letter: S
Question
Submit both the Matlab code and results for the following questions Q1 Use Matlab program to obtain fourth-order Taylor series expansions to predict 10.5) for,f(x) = ln x using a base point at x = 1 Q2 Maming' formula for arectangular channel can be wntten as 1 (BH)5/3 n (B +2H)2/3 VS where Q = flow (m3/s), n = a roughness coefficient, B width (m), H= depth (m), and S= slope You are applying this formula to a stream where you know that the vhdth = 20 m and the depth 0.3 m. Unfortunately, you know the roughness and the slope to only a ± 10% precision. That is, you know that the roughness is about 0.03 with a range from 0.027 to 0.033 and the slope is 0.0003 with a range from 0.00027 to 0.00033. Use a first-order error analysis to determine the sensitivity of the flow prediction to each of these two factors i.e. n and S) Help you can write matlab expression as follows Expression Matlab format 3/2 Q.3 , The deflection y of the top of a sailboat mast is expressed as: FL SEI where r 50 ± 2 (lb / ft) = side loading = L= height 30±0.1 (M) = 1 ,5 x10s ± 0.01 x10s (lb / ft*) 0.06± 0.0006 (fr) E = modulus of elasticity = 1 = moment of inertia a) Estimate the error in y due to uncertainty in the variables. b) Check whether a first order estimate of Taylor series is valid for your calculationsExplanation / Answer
Q1
code
clear
clc
syms x;
result(x) = taylor(log(x), x, 'ExpansionPoint', 1, 'Order', 4);
result
result_value = result(2.5);
result_value
output
result(x) =
x - (x - 1)^2/2 + (x - 1)^3/3 - 1
result_value =
3/2