clc
clear all
close all
Erf=@(x) 2/sqrt(pi)*integral(@(u) exp(-u.^2),0,x);
x=0:0.05:2;
E=[];
Ea=erf(x);
for i=1:length(x)
E(i)=Erf(x(i));
end
plot(x,E,x,Ea,'--g');
legend('Approximation','Exact erf(x)');
fprintf('Approximation of Erf(1) is %f\n',Erf(1));
4. [16 marks] The Error Function function is defined as (a) Starting with the series for e", find the series representation of Erf(x). (b) Use a computer package (eg Matlab, Octave, Excel etc...
4: (1) The function erf(x)= $* e-rdt is called the error function. It is used in the field of probability and cannot be calculated exactly. However, one can expand the integrand as a Taylor polynomial and conduct integration. Find the approximate value of erf (2.0) using the first three terms of the Taylor series around t = 0. (2) Given f(3) = 6, f'(3) = 8, f "(3) =11, and all other higher order derivatives of f(x) are zero at...
(1 point) Find the first five non-zero terms of power series representation centered at x = 0 for the function below. f(x) = arctan(3) Answer: f(x) = + 0 1 /4 What is the radius of convergence? Answer: R= 4 (1 point) Find the first five non-zero terms of power series representation centered at x = 0 for the function below. f(x) = arctan(3) Answer: f(x) = + 0 1 /4 What is the radius of convergence? Answer: R= 4
Please solve for part (b) and (c) thank you! 1. Consider the function f(x) = e-x defined on the interval 0 < x < 1. (a) Give an odd and an even extension of this function onto the interval -1 < x < 1. Your answer can be in the form of an expression, or as a clearly labelled graph. [2 marks] (b) Obtain the Fourier sine and cosine representation for the functions found above. Hint: use integration by parts....
1 point) Consider the Fourier series: nTTc a. Find the Fourier coefficients for the function f(x) 1.2 an b. Use the computer to draw the Fourier series of f(a), for x E[-18, 18], showing clearly all points of convergence. Also, show the graphs with the partial sums of the Fourier series using n5 and n20 terms. What do you observe? 1 point) Consider the Fourier series: nTTc a. Find the Fourier coefficients for the function f(x) 1.2 an b. Use...
(1 point) Consider the Fourier sine series: ) 14, sin( f(z) a. Find the Fourier coefficients for the function f(x)-9, 0, TL b. Use the computer to draw the Fourier sine series of f(x), for x E-15, 151, showing clearly all points of convergence. Also, show the graphs with the partial sums of the Fourier series using n = 5 and n = 20 terms. (1 point) Consider the Fourier sine series: ) 14, sin( f(z) a. Find the Fourier...