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

$88.00

or $1 if you
register a new account!

Related Homework Solutions

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
Numerical Analysis
Homework Solution
$3.00
Mathematics
Numerical Analysis
Problems
Jacobi
Gauss-Seidel
Formula
Numerical Analysis Using Matlab
Homework Solution
$35.00
Mathematics
Numerical Analysis
Taylor Series
Matlab
Graphs
Roundoff Error
Tables
Labels
Range
Script
Codes
Plotting
Trigonometry
Variables
Expressions
Single Precision
Sampling
Absolute Values
Numerical Methods
Homework Solution
$50.00
Mathematics
Numerical Methods
Matlab
Solar Radiation Data
Prediction
Wave Function
Fourier Coefficients
Triangular Wave
Real Comparisons
Imaginary Comparisons
Discrete Transformations
Statements
Variables
Loops
Numerical Analysis Using Matlab
Homework Solution
$85.00
Advanced Mathematics
Numerical Analysis
Matlab
Endpoint Conditions
Cubic Spline
Natural Boundary Conditions
Tables
Scripts
Interpolation
Points
Polynomials
Numerical Orders
Errors
Methods
Get help from a qualified tutor
Live Chats