Problem 1(a)
> for i=1:5
A(i,1) = simps(0,1,2^i);
A(i,2) = pi - A(i,1);
if (i>1)
A(i,3)=A(i-1,2)/A(i,2);
end
end
> A
n
Sn
Error(Sn)
error ratio
2
3.13333333333333
0.00825932025645981
4
3.1415686274509
CSC 2262 Homework Assignment 4
Rahul Shah [email protected]
70 points
Due: 4/14/15 in class
1: Simpsons Rule (20 points)
Evaluate following integrals using Simpsons Rule and Corrected Simpsons Rule(or
Practice Questions for Exam 2 on Wed March 29, 6-8 PM, in Williams 103
1)
In the mass-spring system shown above, the masses m1, m2, m3, m4, m5, m6 and m7
are .4, .9, .7, .8, .6, .5 and .3, the spring
Practice Questions for Final on Thurs Dec 10 5:30-7:30 PM in Tureaud 204
1)
The thin flat sheet shown above has density
The mass of the thin flat sheet is given by the following double integral:
Write
Practice Questions for Exam 1 on Wed Feb 15 6-8 PM in Williams 103
1) A polynomial P is given by
Write a MATLAB program to calculate and print the roots of the polynomial P
(the values of x where the
1)
The thin flat sheet shown above has density
The mass of the thin flat is given by the following double integral:
Write a MATLAB program to calculate and print the mass of the thin flat sheet.
Use 1
CSC 2262 Homework Assignment 3
Rahul Shah [email protected]
50 points
Due: 3/26/13 in class
1: Interpolation and Approximation (30 points)
2
Consider the function f (x) = ex . Now, consider approximat
%Problem
#2
function
value =
fcn(t,v)
value =
9.80.0031*v^
2;
end
function
value =
trapez(a,b,
h,v0)
n=(b-a)/h;
v=zeros(1,
n+1);
t=a:h:b;
v(1)=v0;
for i=2:n+1
vtilde=v(i1)+h*fcn(t(i
-1),v(i-1);
v(i)=v