0% found this document useful (0 votes)
34 views2 pages

ECE 3040 - Test - 01

This document contains the instructions for Test 1 in the ECE 3040 course at WSU during the Spring/Summer 2022 term. It includes 5 questions related to approximating functions using power series, integrals, series summation, Taylor series, and computing vector magnitudes. Students are asked to use Matlab to perform calculations and generate plots for the questions.

Uploaded by

Ali Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

ECE 3040 - Test - 01

This document contains the instructions for Test 1 in the ECE 3040 course at WSU during the Spring/Summer 2022 term. It includes 5 questions related to approximating functions using power series, integrals, series summation, Taylor series, and computing vector magnitudes. Students are asked to use Matlab to perform calculations and generate plots for the questions.

Uploaded by

Ali Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ECE 3040

TEST 1, Spring/Summer 2022, WSU


Dr. Mostafa Daneshgar Rahbar

1. (20 points) Consider the approximation of atan(𝑥) using the power series:

Use Matlab to find the smallest degree of the polynomial that leads to an
absolute true relative error less than 0.0001 when approximating
atan(0.25).

2. (10 points) Approximate the following integral employing fifteen rectangles,


as shown in the figure. Use Matlab to perform all calculations and include it
in you solution.

3. (20 points) The following sum converges to π2/6, as m approaches infinity


Employ Matlab to evaluate the above summation (employ format long) for:
a. m=5
b. m=250
c. Calculate the true error (π2/6 – approximate_value) for each case.

4. (20 points) The Maclaurin series (a special case of the Taylor series) allows
us to express a differentiable, analytic function as an infinite degree
polynomial. Here is the degree seven polynomial approximation of the sine:

Use Matlab to generate a plot of sin(x) (solid blue line) and its polynomial
approximation (dashed red line) for x = 0 to 3π/2 and y from -1.5 to 2. Use
the built-in factorial function in evaluating the polynomial expression.
Employ only fplot, hold and axis commands to generate the plot.

5. (20 points) Write a function that computes the magnitude of a vector x. If x


has a complex component, then display the message “A complex value has
been encountered” and return without computing the magnitude. Recall
that the magnitude of a vector of length n is given by:
√𝑥1 2 + 𝑥2 2 + ⋯ + 𝑥𝑛 2 .

You might also like