Question

Check the file: Questions.pdf

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function Solution()
clear all
clc
close all
disp('----------Question 3-------------')
%syms x
%Iexact=double(int(exp(x^2),x,0,1));

n=[2 4 6 10];
f=@(t)exp(t.^2);
for i=1:3
    ErrorSimpson(i)=Simpson(f,0,1,n(i+1))-Simpson(f,0,1,n(i));
    ErrorTrapezoid(i)=Trapezoid(f,0,1,n(i+1))-Trapezoid(f,0,1,n(i));
end
ErrorSimpson=ErrorSimpson
ErrorTrapezoid=ErrorTrapezoid

%determine the smallest i such that abs(ErrorTrapezoid(i))>10^(-2)
it=3; err=1;%initialize
while abs(err)>10^(-2)
    err=Trapezoid(f,0,1,it)-Trapezoid(f,0,1,it-1);
    it=it+1;
end...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Related Homework Solutions

Numerical Analysis Questions
Homework Solution
$60.00
Numerical Analysis
Mathematics
Computer Science
Graphs
Cost Factors
Compressive Stress
Matlab
Optimization
Documents
Cells
Equations
Functions
Variables
Tables
Mathematics Questions
Homework Solution
$90.00
Mathematics
Single Precision Standard
Double Precision Standard
Matrices
Equations
Matlab
Signs
Convergence
Iterations
Comparison
Errors
Curves
Jacobi
Gauss Seidel
Eigenvectors
Compressed Sensing
Homework Solution
$200.00
Compressed Sensing
Numerical Analysis
Mathematics
Image Models
Equations
Reconstruction Theorems
Minimization
Signal Recovery
Isometry
Linear Systems
Sparse Sampling
Pixels
Inner Products
Translation Vectors
Voxels
Algorithms
Questions & Reports on Numerical Methods for Engineers
Homework Solution
$90.00
Advanced Mathematics
Numerical Analysis
Engineering
Computer Science
Matlab
Programming
Algorithms
Codes
Maxima
Minima
Matrix
Golden Search Method
Loop Operators
2D Direction Function
Central Difference Method
FFT
Seismic Data
Logic Opera
Get help from a qualified tutor
Live Chats