You are on page 1of 6

Date of Examination: 23 july, 2021

Examination Roll no: 20043563017

College Roll no: 2020/1884

Name of Student: Harshita khandelwal

Name of Program: B.SC(H) Mathematics

Semester : II

UPC: 32351202

Title of The Paper: Differential Equations


Final Practical Exam

Name of The College: Maitreyi college

Email ID: harshitakhandelwal967@gmail.com


1. Verify Bolzano Weierstrass Theorem for the sequence
a(n)=(-1)^n, n=1. How many convergent subsequences of the
above sequence are there? Is a(n) convergent sequence?

Answer

Editor window:-

n=1:1:100;
a(n)= (-1).^n;
plot (n,a,'md')
hold on
xlabel ('n')
ylabel ('a(n)')
title('Verifying Bolzano Weierstrass Theorem')

Command window:-

#The above sequence is a bounded sequence and has got two


convergent subsequences namely <1,1,1,.....> and <-1,-1,-1.....>.
Hence, Bolzano weierstrass theorem is verified. Hence, by graph
a(n) is not convergent.
3. Let a(n) be a sequence defined as a(n) = <1,-1/2,1/3,-1/4,1/5,-
1/6.....> . Check the convergence of the series sum(a(n)) by
plotting the sequence of partial sums.Find the sum of the
series, if it exists.

Answer
Editor window:-
clear all
n=1:1:500;
g(n)=(-1).^(n+1)./n;
v=cumsum(g)
plot(v,'rd')

Command window:-
#For the given series,1+{-1/2}+{1/3}+{-1/4}+.... the sequence of partial
sum is
<v(n)>=<1.00000,0.50000,0.83333,0.58333,0.78333,0.61667,0.75952,0.
63452,0.74563,0.64563, 0.73654...> which is in a convergent
sequence.
#the limit is ln2=0.6931. Therefore the given series is convergent and
the sum is 0.6931.

4. Find a natural number m such that n!/(n^n) <10^(-8) for all n


>=m.

Answer

Editor window:-
n=1:1:200;
a(n)=(factorial(n)./(n.^n));
plot(n,a,'rd')
n=1;
while abs(factorial(n)./(n.^n))>=10^(-8);
n=n+1;
endwhile
disp(n)

Command window:-
#the above inequality does not satisfy for n=21 and hence
abs(factorial(n)./(n.^n))<10^(-8) will hold.

#verification that above inequality does not satisfy for n>=21 and hence
abs(factorial(n)./(n.^n))<10^(-8) will hold for all n>=21.

for n=21:500
if abs(factorial(n)./(n.^n))>=10^(-8);
disp(n)
endif
end

5. Solve and plot lake pollution model with (volume of lake) v=


10^5, (constant rate of flow of water) r= 100 and (concentration
of pollutant in the flow entering the lake) u-5 for 0<=t<=20. Use
10 as initial value of pollutant.

Answer

Editor window:-

function cdot=f1(c,t)
r=100; # constant rate of flow of water into the lake and out of the lake
v=100000;
u=5; #concentration of pollutant in the flow entering the lake
cdot=(r./v)*(u-c);
endfunction
Command window:-
c=lsode('f1',10,t=linspace(0,20,100));
plot(t,c)
hold on
xlabel('time')
ylabel('concentration')

You might also like