Question


Answer in MATLAB please. Many thanks. # MATLAB 1. Consider a geometric series of ne1 gr-1. Plot the n-th term an, and the par

1. Consider a geometric series of \(\sum_{n=1}^{\infty} g r^{n-1}\). Plot the \(\mathrm{n}\) -th term \(a_{n}\), and the partial sum \(s_{n}\) versus \(n\) under the following two conditions.

i) with \(g=12\), and \(\mathrm{r}=2 / 3\),

ii) with \(g=12\), and \(r=3 / 2\).

Which of the (i) or (ii) converges? For the convergent one, approximate the total sum, i.e. \(\sum_{n=1}^{\infty} g r^{n-1}\) from your plot and draw a line on the plot to demonstrate this.

2. Using the following inequality, find the value of \(\sum_{n=1}^{\infty} \frac{1}{n^{2}}\) to within \(0.01\) of its exact value.

$$ S_{n}+\int_{n+1}^{\infty} f(x) d x \leq S \leq S_{n}+\int_{n}^{\infty} f(x) d x $$

Find the value of \(n\) through an iterative loop in MATLAB, and compute the lower bound, upper bound and the estimated value of sum.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

1)

a)

clc%clears screen
clear all%clears history
close all%closes all files
format long
g=12;
r=2/3;
a=[];
s=[];
for n=1:20
a(n)=g*r^(n-1);
if(n==1)
s(n)=a(n);
else
s(n)=s(n-1)+a(n);
end
end
plot(a);
title('Plot of terms');
figure;
plot(s);
title('Plot of sum of terms');

– x - 0 X 5 . Search Documentation Pradeep Figure 1 Eile Edit OD View Tools Insert S Desktop Window A O Plot of tel Help O E

b)

clc%clears screen
clear all%clears history
close all%closes all files
format long
g=12;
r=3/2;
a=[];
s=[];
for n=1:20
a(n)=g*r^(n-1);
if(n==1)
s(n)=a(n);
else
s(n)=s(n-1)+a(n);
end
end
plot(a);
title('Plot of terms');
figure;
plot(s);
title('Plot of sum of terms');

- O X Pradeep - 0 X 5 Search Documentation Figure 1 Eile Edit 8 Insert View h Tools Desktop Window DVA Help IE - X Plot of te

Add a comment
Know the answer?
Add Answer to:
Answer in MATLAB please.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Compute the Fourier cosine coefficients for f(x)

    Let \(f(x)= \begin{cases}0 & \text { for } 0 \leq x<2 \\ -(4-x) & \text { for } 2 \leq x \leq 4\end{cases}\)- Compute the Fourier cosine coefficients for \(f(x)\).- \(a_{0}=\)- \(a_{n}=\)- What are the values for the Fourier cosine series \(\frac{a_{0}}{2}+\sum_{n=1}^{\infty} a_{n} \cos \left(\frac{n \pi}{4} x\right)\) at the given points.- \(x=2:\)- \(x=-3\) :- \(x=5:\)

  • Find the periodic solutions of the differential equations

    Find the periodic solutions of the differential equations \((a) \frac{\mathrm{dy}}{\mathrm{dx}}+\mathrm{ky}=\mathrm{f}(\mathrm{x}),(b) \frac{\mathrm{d}^{3} \mathrm{y}}{\mathrm{d}^{3} \mathrm{x}}+\mathrm{ky}=\mathrm{f}(\mathrm{x})\)where \(k\) is a constant and \(f(x)\) is a \(2 \pi\) - periodic function.Consider a Fourier series expansion for \(f(x)\) using the complex form, \(f(x)=\sum_{n=-\infty}^{n=+\infty} f_{n} e^{i n x}\) and try a solution of the form \(y(x)=\sum_{n=-\infty}^{n=+\infty} y_{n} e^{i n x}\)

  • Frequency-domain sampling using Fourier series

    Frequency-domain sampling. Consider the following discrete-time signal$$ x(n)= \begin{cases}a^{|n|}, & |n| \leq L \\ 0, & |n|>L\end{cases} $$where \(a=0.95\) and \(L=10\).(a) Compute and plot the signal \(x(n)\).(b) Show that$$ X(\omega)=\sum_{n=-\infty}^{\infty} x(n) e^{-j \omega n}=x(0)+2 \sum_{n-1}^{L} x(n) \cos \omega n $$Plot \(X(\omega)\) by computing it at \(\omega=\pi k / 100, k=0,1, \ldots, 100\).(c) Compute$$ c_{k}=\frac{1}{N} X\left(\frac{2 \pi}{N} K\right), \quad k=0,1, \ldots, N-1 $$for \(N=30\).(d) Determine and plot the signal$$ \tilde{x}(n)=\sum_{k=0}^{N-1} c k e^{j(2 \pi / N) k n} $$What is the...

  • Consider the heat conduction problem

    5. If \(f(x)=\left\{\begin{array}{cc}0 & -2<x<0 \\ x & 0<x<2\end{array} \quad\right.\)is periodio of period 4 , and whose Fourier series is given by \(\frac{a_{0}}{2}+\sum_{n=1}^{2}\left[a_{n} \cos \left(\frac{n \pi}{2} x\right)+b_{n} \sin \left(\frac{n \pi}{2} x\right)\right], \quad\) find \(a_{n}\)A. \(\frac{2}{n^{2} \pi^{2}}\)B. \(\frac{(-1)^{n}-1}{n^{2} \pi^{2}}\)C. \(\frac{4}{n^{2} \pi^{2}}\)D. \(\frac{2}{n \pi}\)\(\mathbf{E}_{1} \frac{2\left((-1)^{n}-1\right)}{n^{2} \pi^{2}}\)F. \(\frac{4}{n \pi}\)6. Let \(f(x)-2 x-l\) on \([0,2]\). The Fourier sine series for \(f(x)\) is \(\sum_{w}^{n} b_{n} \sin \left(\frac{n \pi}{2} x\right)\), What is \(b, ?\)A. \(\frac{4}{3 \pi}\)B. \(\frac{2}{\pi}\)C. \(\frac{4}{\pi}\)D. \(\frac{-4}{3 \pi}\)E. \(\frac{-2}{\pi}\)F. \(\frac{-4}{\pi}\)7. Let \(f(x)\) be periodic...

  • Determine whether the series converges, and if so, find its sum.

    Determine whether the series converges, and if so, find its sum. (1) \(\sum_{n=1}^{\infty} 3^{-n} 8^{n+1}\)\((2) \sum_{n=2}^{\infty} \frac{1}{n(n-1)}\)(3) \(\sum_{n=0}^{\infty}(-3)\left(\frac{2}{3}\right)^{2 n}\)(4) \(\sum_{n=1}^{\infty} \frac{1}{e^{2 n}}\)(5) \(\sum_{n=1}^{\infty} \ln \frac{n}{n+1}\)(6) \(\sum_{n=1}^{\infty}[\arctan (n+1)-\arctan n]\)(7) \(\sum_{n=1}^{\infty} \ln \left(\frac{n^{2}+4}{2 n^{2}+1}\right)\)(8) \(\sum_{n=1}^{\infty} \frac{1+2^{n}}{3^{n}}\)(9) \(\sum_{n=1}^{\infty}\left[\cos \frac{1}{n^{2}}-\cos \frac{1}{(n+1)^{2}}\right]\)

  • Cansider the series

    Cansider the series \(\sum_{n=1}^{\infty} a_{n}\) where$$ a_{n}=\frac{\left(6 n^{2}+2\right)(-7)^{n}}{5^{n+1}} $$In this problem you must attempt to use the Ratio Test to decide whether the series converges.Compute$$ L=\lim _{n \rightarrow \infty}\left|\frac{a_{n+1}}{a_{n}}\right| $$Enter the numerical value of the limit \(L\) if it converges, INF if it diverges to infinity, -INF if it diverges to negative infinity, or DIV if it diverges but not to infinity or negative infinity.L= _______Which of the following statements is true?A. The Ratio Test says that the series converges absolutely.B. The...

  • Determine whether the given series converges or diverges

    Determine whether the given series converges or diverges. Fully justify your answe(a) \(\sum_{n=2}^{\infty} \frac{1}{\sqrt{n} \ln n}\)(b) \(\sum_{n=1}^{\infty} \cos \left(\frac{1}{n^{2}}\right)\)(c) \(\sum_{n=1}^{x} \frac{(2 n) !}{5^{n} n ! n t}\)

  • Consider the series

    Consider the series \(\sum_{n=1} a_{n}\) where$$ a_{n}=\frac{(-1)^{n} n^{2}}{n^{2}+4 n+3} $$In this problem you must attempt to use the Ratio Test to decide whether the series converges.Compute$$ L=\lim _{n \rightarrow \infty}\left|\frac{a_{n+1}}{a_{n}}\right| $$Enter the numerical value of the limit \(L\) if it converges, INF if it diverges to infinity, -INF if it diverges to negative infinity, or DIV if it diverges but not to infinity or negative infinity.L= _______Which of the following statements is true?A. The Ratio Test says that the series...

  • Use a power series to approximate the definite integral,

    17 Use a power series to approximate the definite integral, \(I\), to six decimal places.$$ \int_{0}^{0.4} \frac{x^{5}}{1+x^{7}} d x $$Find the radius of convergence, \(R\), of the series.$$ \sum_{n=1}^{\infty} \frac{x^{n+4}}{4 n !} $$$$ R= $$Find the interval, \(I\), of convergence of the series. (Enter your answer using interval notation.) \(I=\)

  • Consider the series

    Consider the series \(\sum_{n=1} a_{n}\) whereIn this problem you must attempt to use the Ratio Test to decide whether the series converges.Compute$$ L=\lim _{n \rightarrow \infty}\left|\frac{a_{n+1}}{a_{n}}\right| $$Enter the numerical value of the limit \(L\) if it converges, INF if it diverges to infinity, -INF if it diverges to negative infinity, or DIV if it diverges but not to infinity or negative infinity.L= _______Which of the following statements is true?A. The Ratio Test says that the series converges absolutely.B. The Ratio...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT