0
answers
0
watching
46
views
9 Nov 2019
Please show work
a) Conisder the function y = Ax^1/2 + Bsin^2(x-10) + ln(x).Write a MATLAB code which calculates the area using a trapezoidalrule with dx=.01 from x=1 to x=10.
b) Write a MATLAB code which uses the quad command to integratethe same area. You may either use the INLINE command or functionhandles to define the function y(x).
c) Write a MATLAB code with takes the derivative of this that isO(*delta*x^2). Use forward- and backward-difference formulas at theend-points and central difference in the middle.
Write down a MATLAB code to compute this A matrix using any combination of the commands: spdiaga, tril, trius, diag, ones, zeros. Consider the function y= Ax1/2 + Bsin2(x-10)+ln(x). Write a MATLAB code which calculate the arm using a trapezoidal rule with dx = 0.01 from x = 1 to x = 10. Write a MATLAB code which uses the quad command to integrate the same area. You may either use the inline command or function handles to define the function y(x). Write a MATLAB code which takes the derivative of this that is O(Deltax2). Use forward-and backward-difference formulas at the end-points and central-difference in the middle.
Please show work
a) Conisder the function y = Ax^1/2 + Bsin^2(x-10) + ln(x).Write a MATLAB code which calculates the area using a trapezoidalrule with dx=.01 from x=1 to x=10.
b) Write a MATLAB code which uses the quad command to integratethe same area. You may either use the INLINE command or functionhandles to define the function y(x).
c) Write a MATLAB code with takes the derivative of this that isO(*delta*x^2). Use forward- and backward-difference formulas at theend-points and central difference in the middle.
Write down a MATLAB code to compute this A matrix using any combination of the commands: spdiaga, tril, trius, diag, ones, zeros. Consider the function y= Ax1/2 + Bsin2(x-10)+ln(x). Write a MATLAB code which calculate the arm using a trapezoidal rule with dx = 0.01 from x = 1 to x = 10. Write a MATLAB code which uses the quad command to integrate the same area. You may either use the inline command or function handles to define the function y(x). Write a MATLAB code which takes the derivative of this that is O(Deltax2). Use forward-and backward-difference formulas at the end-points and central-difference in the middle.