Problem 1:
The matrix e^A is defined by the Mclaurin series
e^A=1+A/1!+A^2/2!+A^3/3!+........+A^n/n!
This computation can be quite difficult, as this problem illustrates.
a)Enter the function
function E=matexp(A)
E=zeros(size(A));
F=eye(size(A));
k=1;
while norm (E+F-E,1) > 0
E=E+F;
F=A*F/k;
k=k+a;
end
that estimates e^A using Mclaurin series.
b)Apply matexp to the matrix a=[99 -100; 137 -138] to obtaion matrix A_Mclaurin
c)A_Mclaurin is far from the correct result.ompute the true value of e^A using the MATLAB function expm as follows:
>>showdemo expmdemo
The function uses the Pade approximation
d)Explain why the result in part (b) is so far from the correct
result. Use MATLAB help by typing


%%Matlab code for matrix exponential by McLaurin series
clear all
close all
%Here matrix A
A=[99 -100; 137 -138];
%Applying matexp on A
[E,F,k]=matexp(A);
fprintf('A matrix is \n')
disp(A)
fprintf('Using matexp A_Maclaurin is \n')
disp(E)
fprintf('Using expm A_Maclaurin is \n')
A_true= expm(A);
disp(A_true)
help expm
%function for matrix exponential
function [E,F,k]=matexp(A)
E = zeros(size(A));
F = eye(size(A));
k = 1;
while norm(E+F-E,1) > 0
E = E+F;
F = A*F/k;
k = k+1;
end
end
%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%
Problem 1: The matrix e^A is defined by the Mclaurin series e^A=1+A/1!+A^2/2!+A^3/3!+........+A^n/n! This computation ca...
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) to plot the series approximation for Erf(x) (using the first four non-zero terms) for x e (0,2]. Plot Erf(x) over the same range on the same axis and comment. (c) Estimate Erf(1.0) using the first 4 non-zero terms in the series and compare with the approx- imation...
Intro Step 11
We will be working with the following matrix [1 2 3 0 0 0 0 2 1 2 3 0 0 0 3 2 1 2 3 0 0 0 3 2 1 2 3 0 0 0 3 2 1 2 3 0 0 0 3 2 1 2 0 0 0 0 3 2 1 0 0 0 0 0 3 2 0] 0 0 0 0 3 2 1 Use MATLAB to find the...
Fourier Series MA 441 1 An Opening Example: Consider the function f defined as follows: f(z +2n)-f(z) Below is the graph of the function f(x): 1. Find the Taylor series for f(z) ontered atェ 2. For what values of z is that series a good approximation? 3. Find the Taylor series for this function centered at . 4. For what values ofェis that series a good approximation? 5, Can you find a Taylor series for this function atェ-0?
Fourier Series...
answer 4, 5, 6, 7 using matlab
Homework 10 1. Write the correct first-line syntax for a user defined function that is named Feynman and has input variables q and e, and outputs L and M. (Comment out of this line). 2. Using zeros, ones, and eye commands write the one line syntax to create the following matrix: 00000 01100 01010 01001 3. Write the syntax for the user defined function that calculates the surface area and volume of a...
on matlab
(1) Matrices are entered row-wise. Row commas. Enter 1 2 3 (2) Element A, of matrix A is accesser (3) Correcting an entry is easy to (4) Any submatrix of Ais obtained by d row wise. Rows are separated by semicolons and columns are separated by spaces ner A l 23:45 6. B and hit the return/enter kry matrix A is accessed as A Enter and hit the returnerter key an entry is easy through indesine Enter 19...
1. (a) Evaluate the Fourier coefficients a, an, ba for the function defined as f)-2 cos() for-π/2 s sn2 and zero else over the period of 2T, do NOT use MATLAB or a calculator for integrations. All the steps should be shown. Write a few terms of the Fourier series expansion Plot 2 or 3 cycles of the Fourier series using MATLAB and verify whether the plot matches the given waveform Find Co and Cn and plot the amplitude spectrum...
n=2
Question 3 3 pts Find the Fourier Sine series for the function defined by 0<c<n f() = { 0, 2n, n<3 < 2n and write down, 1. The period T and the frequency wo of the Fourier Sine series 2. The coefficients bn for n = 1,2,3,...
Please do 1,3,4,5,6
Write the Fourier series representation for each periodic func- tion. One period is defined for each. Express the answer as a series f(t) = 1, using the summation symbol. Problem 7 of Section 7.2 Problem 8 of Section 7.2 Problem 9 of Section 7.2 Problem 11 of Section 7.2 Problem 14 of Section 7.2 9. 10. 11. 12. 13. f(t) = t + 2π, -2π < t < 2π 4. ft) 5. Use Maple to compute the...
Question 3 (1 point) The function f is defined by the power series 1)2 3! 5! 72n+1)! 1)% n-0 (2n+1) ! for all real numbers x. Use the first and second derivative test by finding f(x) and f"(x). Determine whether f has a local maximum, a local minimum, or neither at x=0. Give a reason for your answer. Use the
Question 3 (1 point) The function f is defined by the power series 1)2 3! 5! 72n+1)! 1)% n-0 (2n+1)...
Using MATLAB
(a) Find the Fourier series for 25 { O if 1 r<O 1-2 if 0<H<1 f(x) defined on the interval -1<rs1. T-2 (b) Using MATLAB, plot the first 20 terms and the first 200 terms of the Fourier series in the interval -3< r<3, In order to do this, the r-interval should be divided into 6001 cqually spaced points by making use of the MATLAB command linspace.
(a) Find the Fourier series for 25 { O if 1...