The horizontal velocity of a body is given as a function of

The horizontal velocity of a body is given as a function of time by

v(t) = -t2+4

a) Use the two-segment trapezoidal rule to find the distance covered from t=-1 to t=1 seconds.

b) Find the true error.

c) Find the absolute relative true error

This is for a MatLab test so i would have to write a function file.

Solution

clear all;

close all;

clc;

t=-1:0.01:1;

v=-t^2 +4;

plot(t,v);

x-label(\'time\');

y-label(\'velocity\');

title(\'distance\')

The horizontal velocity of a body is given as a function of time by v(t) = -t2+4 a) Use the two-segment trapezoidal rule to find the distance covered from t=-1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site