HPAS 2018 Mathematics Optional Paper-2: Complete Solutions
Welcome to the comprehensive solution guide for the Himachal Pradesh Administrative Service (HPAS) 2018 Mathematics Optional Paper-2. This resource provides detailed, step-by-step solutions designed specifically for civil service aspirants to master the core mathematical concepts and methodologies required for the exam.
Whether you are revising key theorems, practicing previous year questions, or mastering advanced abstract algebra, real analysis, and differential equations, these carefully structured solutions will help streamline your preparation. Use the index below to jump directly to specific questions and topics.
Table of Contents
- Question 1(a): Group of Bijections
- Question 1(b): Closure in Metric Space
- Question 1(c): Complex Exponentiation
- Question 1(d): Limsup and Liminf
- Question 2(a): Order of a Group
- Question 2(b): Group Homomorphism Image
- Question 3(a): Convergence of Improper Integral
- Question 3(b): Laplace Transform of Fractional Power
- Question 4(a): PDE for Right Circular Cones
- Question 4(b): Wave Equation Verification
- Question 5(a): Integral of Piecewise Function
- Question 5(b): Darboux Sums Inequality
- Question 6(a): Open Sphere in Euclidean Metric
- Question 6(b): Closed Sphere in Taxicab Metric
- Question 7(a): Series Convergence (Factorial)
- Question 7(b): Series Convergence (Root Test)
- Question 8(a): Trapezoidal Rule Algorithm
- Question 8(b): Euler’s Method Algorithm
HPAS 2018 Maths Optional Paper-2 Question 1(a)
Let X be any non-empty set and S(X) be the set of all bijections of X onto itself. Then prove that (S(X), \circ) is an abelian group if and only if X is a set with one or two elements, where \circ is the operation of composition of functions.
Solution:
Given: X is a non-empty set and S(X) denotes the set of all bijections from X onto itself. The binary operation is composition of functions.
Required: Prove that (S(X),\circ) is an abelian group if and only if X has either one element or two elements.
Step 1: First verify that (S(X),\circ) is always a group
Let f,g,h\in S(X). Since the composition of two bijections is again a bijection, f\circ g\in S(X). Hence closure holds.
Composition of functions is associative, therefore
(f\circ g)\circ h=f\circ(g\circ h).The identity map I_X:X\to X, defined by I_X(x)=x for every x\in X, belongs to S(X) and satisfies
f\circ I_X=I_X\circ f=f.Every f\in S(X) is bijective, so its inverse f^{-1}:X\to X exists and is also a bijection. Thus f^{-1}\in S(X) and
f\circ f^{-1}=f^{-1}\circ f=I_X.Hence (S(X),\circ) is a group for every non-empty set X. It remains to determine exactly when this group is abelian.
Step 2: If |X|=1, then S(X) is abelian
Suppose X=\{a\}. There is only one bijection of X onto itself, namely the identity map:
S(X)=\{I_X\}.A group containing only one element is trivially abelian.
Step 3: If |X|=2, then S(X) is abelian
Let X=\{a,b\}. There are exactly two bijections:
- the identity I_X,
- the transposition \tau which interchanges a and b.
Thus
S(X)=\{I_X,\tau\},\qquad \tau^2=I_X.This is a cyclic group of order 2, generated by \tau. Every cyclic group is abelian. Hence S(X) is abelian.
Step 4: If X has at least three distinct elements, then S(X) is not abelian
Assume that X contains three distinct elements a,b,c. Define two permutations \sigma,\tau\in S(X) as follows:
\sigma interchanges a and b and fixes every other element; \tau interchanges b and c and fixes every other element.
In cycle notation,
\sigma=(ab),\qquad \tau=(bc).Now compare (\sigma\circ\tau)(a) and (\tau\circ\sigma)(a).
Since \tau fixes a,
(\sigma\circ\tau)(a)=\sigma(\tau(a))=\sigma(a)=b.On the other hand,
(\tau\circ\sigma)(a)=\tau(\sigma(a))=\tau(b)=c.Because b\ne c, we have
\sigma\circ\tau\ne\tau\circ\sigma.Therefore S(X) is not abelian whenever X contains at least three elements. This argument works for both finite and infinite sets.
Final Answer:
(S(X),\circ)\text{ is abelian }\Longleftrightarrow |X|=1\text{ or }|X|=2.HPAS 2018 Maths Optional Paper-2 Question 1(b)
Let (X, d) be a metric space and let A \subseteq X. Then prove that \overline{A} = \{x \in X : d(x,A) = 0\}.
Solution:
Definition: For a non-empty subset A of a metric space (X,d), the distance of a point x\in X from A is defined by
d(x,A)=\inf\{d(x,a):a\in A\}.The closure \overline A consists of all points x\in X such that every open ball centered at x meets A. Thus
x\in\overline A\Longleftrightarrow B(x,\varepsilon)\cap A\ne\varnothing\quad\text{for every }\varepsilon>0.We prove both inclusions.
Part I: Show that \overline A\subseteq\{x\in X:d(x,A)=0\}
Let x\in\overline A. Then, by the characterization of closure, for every \varepsilon>0,
B(x,\varepsilon)\cap A\ne\varnothing.Therefore there exists some a_\varepsilon\in A such that
d(x,a_\varepsilon)<\varepsilon.Since d(x,A) is the infimum of all numbers d(x,a) with a\in A,
0\le d(x,A)\le d(x,a_\varepsilon)<\varepsilon.This inequality holds for every \varepsilon>0. The only non-negative real number smaller than every positive \varepsilon is zero. Hence
d(x,A)=0.Thus
\overline A\subseteq\{x\in X:d(x,A)=0\}.Part II: Show that \{x\in X:d(x,A)=0\}\subseteq\overline A
Let x\in X satisfy
d(x,A)=0.We must prove that every open ball centered at x intersects A. Let \varepsilon>0 be arbitrary.
Because
\inf\{d(x,a):a\in A\}=0,there must exist an element a\in A for which
d(x,a)<\varepsilon.If no such a existed, then d(x,a)\ge\varepsilon for every a\in A, which would imply d(x,A)\ge\varepsilon>0, contradicting d(x,A)=0.
Thus a\in B(x,\varepsilon)\cap A, and hence
B(x,\varepsilon)\cap A\ne\varnothing.Since \varepsilon>0 was arbitrary, x\in\overline A. Therefore
\{x\in X:d(x,A)=0\}\subseteq\overline A.Combining the two inclusions gives the required equality.
Final Answer:
\boxed{\overline A=\{x\in X:d(x,A)=0\}}.HPAS 2018 Maths Optional Paper-2 Question 1(c)
If X = \sqrt{-1}, then find the value of X^X.
Solution:
Given: X=\sqrt{-1}=i. We have to determine X^X=i^i.
Relevant result: Complex logarithm and complex powers
For a non-zero complex number z, the multivalued logarithm is
\log z=\ln|z|+i(\arg z+2\pi n),\qquad n\in\mathbb Z.A complex power is defined by
z^w=e^{w\log z}.Step 1: Find all logarithms of i
For i,
|i|=1,\qquad \arg i=\frac{\pi}{2}+2\pi n,\quad n\in\mathbb Z.Therefore
\log i=\ln 1+i\left(\frac{\pi}{2}+2\pi n\right)=i\left(\frac{\pi}{2}+2\pi n\right).Step 2: Compute i^i
Using i^i=e^{i\log i},
i^i = e^{\,i\cdot i\left(\frac{\pi}{2}+2\pi n\right)} = e^{-\left(\frac{\pi}{2}+2\pi n\right)}, \qquad n\in\mathbb Z,because i^2=-1. Thus every value of i^i is real and positive.
Principal value:
The principal argument of i is \pi/2, corresponding to n=0. Hence the principal value is
i^i=e^{-\pi/2}.Final Answer:
All values are
\boxed{i^i=e^{-(\pi/2+2\pi n)},\quad n\in\mathbb Z}.The principal value is
\boxed{e^{-\pi/2}}.HPAS 2018 Maths Optional Paper-2 Question 1(d)
Find the \limsup and \liminf of the sequence (-1)^n + \frac{1}{n}.
Solution:
Let
a_n=(-1)^n+\frac1n.We determine the limits of the even and odd subsequences.
Even subsequence
Put n=2k. Then
a_{2k}=(-1)^{2k}+\frac1{2k} =1+\frac1{2k}.Therefore
\lim_{k\to\infty}a_{2k}=1.Odd subsequence
Put n=2k+1. Then
a_{2k+1}=(-1)^{2k+1}+\frac1{2k+1} =-1+\frac1{2k+1}.Therefore
\lim_{k\to\infty}a_{2k+1}=-1.Hence the sequence has exactly two subsequential limit points, namely 1 and -1. The largest subsequential limit is the limit superior and the smallest subsequential limit is the limit inferior.
Equivalently, if
s_N=\sup\{a_n:n\ge N\},\qquad i_N=\inf\{a_n:n\ge N\},then the largest terms in a sufficiently late tail occur on the even subsequence and approach 1, while the odd terms approach -1. Thus
\lim_{N\to\infty}s_N=1,\qquad \lim_{N\to\infty}i_N=-1.Final Answer:
\boxed{\limsup_{n\to\infty}\left((-1)^n+\frac1n\right)=1}and
\boxed{\liminf_{n\to\infty}\left((-1)^n+\frac1n\right)=-1}.HPAS 2018 Maths Optional Paper-2 Question 2(a)
Let G be a group that has two subgroups of orders 45 and 75. If |G| < 400, find |G|.
Solution:
Relevant theorem: Lagrange’s theorem
If H is a finite subgroup of a finite group G, then the order of H divides the order of G.
Here G contains subgroups of orders 45 and 75. Therefore
45\mid |G|\qquad\text{and}\qquad 75\mid |G|.Hence |G| must be a common multiple of 45 and 75.
Factorize:
45=3^2\cdot5,\qquad 75=3\cdot5^2.Therefore
\operatorname{lcm}(45,75) = 3^2\cdot5^2 = 9\cdot25 = 225.Thus
225\mid |G|.The positive multiples of 225 are
225,\ 450,\ 675,\ldotsBut the question gives
|G|<400.Therefore the only possible value is 225.
Final Answer:
\boxed{|G|=225}.HPAS 2018 Maths Optional Paper-2 Question 2(b)
Let f:G \to H be a group homomorphism with kernel K. If the orders of G, H, and K are 75, 45, and 15 respectively, find the order of the image f(G).
Solution:
Given:
|G|=75,\qquad |H|=45,\qquad |\ker f|=|K|=15.Relevant theorem: First Isomorphism Theorem
If f:G\to H is a group homomorphism, then
G/\ker f\cong \operatorname{Im}f.For finite groups, taking orders gives
|\operatorname{Im}f|=\frac{|G|}{|\ker f|}.Substituting the given values,
|f(G)| = |\operatorname{Im}f| = \frac{75}{15} = 5.This is consistent with Lagrange’s theorem because f(G) is a subgroup of H, and indeed 5\mid45.
Final Answer:
\boxed{|f(G)|=5}.HPAS 2018 Maths Optional Paper-2 Question 3(a)
Determine the values of s for which the improper integral \int_{0}^{\infty} e^{-sx} dx converges.
Solution:
Consider
I(s)=\int_0^\infty e^{-sx}\,dx.For real s
By the definition of an improper integral,
I(s) = \lim_{R\to\infty}\int_0^R e^{-sx}\,dx.Case 1: s>0
For s\ne0,
\int e^{-sx}\,dx=-\frac1s e^{-sx}.Hence
\int_0^R e^{-sx}\,dx = \left[-\frac1s e^{-sx}\right]_0^R = -\frac{e^{-sR}}s+\frac1s = \frac{1-e^{-sR}}s.If s>0, then e^{-sR}\to0 as R\to\infty. Therefore
I(s)=\frac1s.Hence the integral converges.
Case 2: s=0
Then the integrand is 1, so
\int_0^R1\,dx=R\to\infty.Thus the integral diverges.
Case 3: s<0
Write s=-a, where a>0. Then
e^{-sx}=e^{ax},which grows exponentially, and
\int_0^R e^{ax}\,dx = \frac{e^{aR}-1}{a}\to\infty.Thus the integral diverges.
Complex parameter: If s is allowed to be complex, then |e^{-sx}|=e^{-(\operatorname{Re}s)x}, so the corresponding condition is \operatorname{Re}s>0.
Final Answer:
For real s,
\boxed{\int_0^\infty e^{-sx}\,dx\text{ converges iff }s>0,\quad\text{and then equals }\frac1s.}If s is complex, the convergence condition is \boxed{\operatorname{Re}s>0}.
HPAS 2018 Maths Optional Paper-2 Question 3(b)
Find the value of L\{x^{7/2}\}.
Solution:
Relevant Laplace-transform formula
For \alpha>-1,
\mathcal L\{x^\alpha\} = \int_0^\infty e^{-sx}x^\alpha\,dx = \frac{\Gamma(\alpha+1)}{s^{\alpha+1}}, \qquad s>0.Here
\alpha=\frac72.Therefore
\mathcal L\left\{x^{7/2}\right\} = \frac{\Gamma(9/2)}{s^{9/2}}.Now evaluate \Gamma(9/2) by repeated use of \Gamma(r+1)=r\Gamma(r) and \Gamma(1/2)=\sqrt\pi:
\Gamma\left(\frac92\right) = \frac72\Gamma\left(\frac72\right) = \frac72\cdot\frac52\Gamma\left(\frac52\right) = \frac72\cdot\frac52\cdot\frac32\Gamma\left(\frac32\right) = \frac72\cdot\frac52\cdot\frac32\cdot\frac12\Gamma\left(\frac12\right).Hence
\Gamma\left(\frac92\right) = \frac{7\cdot5\cdot3\cdot1}{2^4}\sqrt\pi = \frac{105\sqrt\pi}{16}.Substituting,
\mathcal L\left\{x^{7/2}\right\} = \frac{105\sqrt\pi}{16s^{9/2}}.Final Answer:
\boxed{\mathcal L\{x^{7/2}\}=\frac{105\sqrt\pi}{16s^{9/2}},\qquad s>0.}HPAS 2018 Maths Optional Paper-2 Question 4(a)
Obtain the partial differential equation for the set of all right circular cones whose axes coincide with the z-axis.
Solution:
Standard interpretation: A right circular cone whose axis is the z-axis and whose vertex is at the origin can be written as
x^2+y^2=z^2\tan^2\alpha,where \alpha is the semi-vertical angle. The arbitrary parameter to be eliminated is \alpha.
Let
p=\frac{\partial z}{\partial x},\qquad q=\frac{\partial z}{\partial y}.Step 1: Differentiate with respect to x
Differentiating
x^2+y^2=z^2\tan^2\alphawith respect to x, treating \alpha as a constant, gives
2x=2z\,p\,\tan^2\alpha.Hence
x=zp\tan^2\alpha.\tag{1}Step 2: Differentiate with respect to y
Similarly,
2y=2z\,q\,\tan^2\alpha,so
y=zq\tan^2\alpha.\tag{2}Step 3: Eliminate the parameter
Multiply equation (1) by x and equation (2) by y:
x^2=xzp\tan^2\alpha, y^2=yzq\tan^2\alpha.Adding,
x^2+y^2 = z\tan^2\alpha(xp+yq).But from the original cone equation,
x^2+y^2=z^2\tan^2\alpha.Therefore, wherever the non-degenerate cone equation applies,
z^2\tan^2\alpha = z\tan^2\alpha(xp+yq).Cancelling the common factor gives
xp+yq=z.Remark on the wording: The question does not explicitly state that the vertex is fixed at the origin. If the vertex is allowed to move along the z-axis, a two-parameter family may be written as z=a+b\sqrt{x^2+y^2}. Eliminating a,b from the first derivatives gives the rotational condition yp-xq=0. In the usual textbook interpretation of this question, however, the cone has vertex at the origin and the expected PDE is the one derived above.
Final Answer:
Under the standard origin-vertex interpretation,
\boxed{x\frac{\partial z}{\partial x}+y\frac{\partial z}{\partial y}=z}.HPAS 2018 Maths Optional Paper-2 Question 4(b)
Prove that any sufficiently differentiable function of the form F(x+kt) satisfies the wave equation F_{xx} = (1/k^2)F_{tt}.
Solution:
Let
u(x,t)=F(x+kt),where F is sufficiently differentiable and k\ne0. We have to prove that
u_{xx}=\frac1{k^2}u_{tt}.Put
\xi=x+kt.Then u(x,t)=F(\xi).
Differentiate with respect to x
By the chain rule,
u_x = F'(\xi)\frac{\partial\xi}{\partial x}.Since
\frac{\partial\xi}{\partial x}=1,we obtain
u_x=F'(\xi).Differentiating once more with respect to x,
u_{xx} = F''(\xi)\frac{\partial\xi}{\partial x} = F''(\xi). \tag{1}Differentiate with respect to t
Again by the chain rule,
u_t = F'(\xi)\frac{\partial\xi}{\partial t}.Since
\frac{\partial\xi}{\partial t}=k,we get
u_t=kF'(\xi).Differentiating once more with respect to t,
u_{tt} = kF''(\xi)\frac{\partial\xi}{\partial t} = kF''(\xi)\cdot k = k^2F''(\xi). \tag{2}From (1), F''(\xi)=u_{xx}. Substituting in (2),
u_{tt}=k^2u_{xx}.Therefore
u_{xx}=\frac1{k^2}u_{tt}.Final Answer:
\boxed{F(x+kt)\text{ satisfies }F_{xx}=\frac1{k^2}F_{tt}.}Hence the required wave equation is established.
HPAS 2018 Maths Optional Paper-2 Question 5(a)
Let
f(x) = \begin{cases} c, & 0 \le x \le c \\ 2c, & c < x \le 1 \end{cases}If \int_{0}^{1} f(x) dx = \frac{7}{16}, find the value of c.
Solution:
The function is
f(x)= \begin{cases} c,&0\le x\le c,\\ 2c,&c<x\le1. \end{cases}Since the break point c lies in the interval [0,1], a valid solution must satisfy
0\le c\le1.We are given
\int_0^1 f(x)\,dx=\frac7{16}.Step 1: Split the integral at x=c
\int_0^1 f(x)\,dx = \int_0^c c\,dx + \int_c^1 2c\,dx.Evaluate each integral:
\int_0^c c\,dx = c[x]_0^c = c(c-0) = c^2,and
\int_c^1 2c\,dx = 2c[x]_c^1 = 2c(1-c).Therefore
\int_0^1f(x)\,dx = c^2+2c(1-c) = c^2+2c-2c^2 = 2c-c^2.Using the given value,
2c-c^2=\frac7{16}.Rearrange:
c^2-2c+\frac7{16}=0.Multiplying by 16,
16c^2-32c+7=0.Using the quadratic formula,
c = \frac{32\pm\sqrt{(-32)^2-4(16)(7)}}{2(16)} = \frac{32\pm\sqrt{1024-448}}{32}. c = \frac{32\pm\sqrt{576}}{32} = \frac{32\pm24}{32}.Thus
c=\frac{56}{32}=\frac74or
c=\frac8{32}=\frac14.But c must lie in [0,1]. Hence 7/4 is inadmissible.
Final Answer:
\boxed{c=\frac14}.HPAS 2018 Maths Optional Paper-2 Question 5(b)
Let f:[0,1] \to \mathbb{R} be a continuous function. For any partition P of [0, 1], let L(P,f) and U(P,f) denote the lower and upper Darboux sums respectively. Let P = \{0, 0.01, 0.02, \dots, 1\} and Q = \{0, 0.001, 0.002, \dots, 1\} be two partitions of [0, 1]. Then prove that L(P,f) \le L(Q,f) \le U(Q,f) \le U(P,f).
Solution:
Relevant result: Darboux sums under refinement
If a partition Q is a refinement of a partition P, then for every bounded function f,
L(P,f)\le L(Q,f)\le U(Q,f)\le U(P,f).We verify that the present partitions satisfy the hypothesis and then justify each inequality.
The partitions are
P=\{0,0.01,0.02,\ldots,1\}and
Q=\{0,0.001,0.002,\ldots,1\}.Every point of P is also a point of Q, because
0.01j=0.001(10j).Hence
P\subseteq Q,so Q is a refinement of P.
Step 1: Show L(P,f)\le L(Q,f)
Consider one interval I=[x_{i-1},x_i] of the coarser partition P. The refinement Q divides I into smaller intervals I_1,\ldots,I_m. Let
m_I=\inf_{x\in I}f(x),\qquad m_j=\inf_{x\in I_j}f(x).Since I_j\subseteq I,
m_I\le m_jfor every j. Therefore
m_I|I| = m_I\sum_{j=1}^m|I_j| \le \sum_{j=1}^m m_j|I_j|.Summing this inequality over all intervals of P yields
L(P,f)\le L(Q,f).Step 2: Show U(Q,f)\le U(P,f)
For the same intervals, let
M_I=\sup_{x\in I}f(x),\qquad M_j=\sup_{x\in I_j}f(x).Since I_j\subseteq I,
M_j\le M_I.Hence
\sum_{j=1}^mM_j|I_j| \le M_I\sum_{j=1}^m|I_j| = M_I|I|.Summing over the intervals of P gives
U(Q,f)\le U(P,f).Step 3: Show L(Q,f)\le U(Q,f)
For every subinterval J of Q,
\inf_{x\in J}f(x)\le\sup_{x\in J}f(x).Multiplying by the positive length of J and summing over all subintervals gives
L(Q,f)\le U(Q,f).Combining the three inequalities,
L(P,f)\le L(Q,f)\le U(Q,f)\le U(P,f).Final Answer:
\boxed{L(P,f)\le L(Q,f)\le U(Q,f)\le U(P,f)}.The required result follows because Q is a refinement of P.
HPAS 2018 Maths Optional Paper-2 Question 6(a)
Define an open sphere in a metric space. Describe with a figure the open sphere of unit radius centered at (0,0) for the metric d(z_1, z_2) = \sqrt{(x_1-x_2)^2 + (y_1-y_2)^2} defined on \mathbb{R}^2, where z_1 = (x_1, y_1) and z_2 = (x_2, y_2) are any two points of \mathbb{R}^2.
Solution:
Definition of an open sphere: In a metric space (X,d), the open sphere (open ball) of radius r>0 centered at a\in X is
B(a,r)=\{x\in X:d(x,a)<r\}.Here X=\mathbb R^2, the center is (0,0), the radius is 1, and the metric is the ordinary Euclidean metric
d(z_1,z_2) = \sqrt{(x_1-x_2)^2+(y_1-y_2)^2}.For a point (x,y)\in\mathbb R^2,
d((x,y),(0,0)) = \sqrt{x^2+y^2}.The point lies in the open sphere of unit radius precisely when
\sqrt{x^2+y^2}<1.Squaring both sides,
x^2+y^2<1.Thus the required open sphere is the entire interior of the unit circle x^2+y^2=1, while the circular boundary itself is not included.
Schematic figure:
y
^
. . . . .
. .
. inside .
. x²+y²<1 .
-------.---------O-----------.------> x
. .
. .
. .
. . . . .
Dotted circumference: x²+y²=1 (not included)
Final Answer:
\boxed{B((0,0),1)=\{(x,y)\in\mathbb R^2:x^2+y^2<1\}}.HPAS 2018 Maths Optional Paper-2 Question 6(b)
Define a closed sphere in a metric space. Describe with a figure the closed sphere of unit radius centered at (0,0) for the metric d(z_1, z_2) = |x_1-x_2| + |y_1-y_2| defined on \mathbb{R}^2, where z_1 = (x_1, y_1) and z_2 = (x_2, y_2) are any two points of \mathbb{R}^2.
Solution:
Definition of a closed sphere: In a metric space (X,d), the closed sphere (closed ball) of radius r>0 centered at a\in X is
\overline B(a,r)=\{x\in X:d(x,a)\le r\}.Here the metric is the taxicab (or \ell^1) metric
d(z_1,z_2)=|x_1-x_2|+|y_1-y_2|.For the center (0,0),
d((x,y),(0,0)) = |x|+|y|.Therefore a point (x,y) belongs to the closed sphere of unit radius exactly when
|x|+|y|\le1.Description of the boundary
The boundary is
|x|+|y|=1.In the four quadrants this becomes four straight-line segments:
x+y=1,\quad -x+y=1,\quad -x-y=1,\quad x-y=1.These segments join the four vertices
(1,0),\quad(0,1),\quad(-1,0),\quad(0,-1).Hence the taxicab closed unit sphere is a diamond-shaped region, including its boundary.
Schematic figure:
y
^
(0,1)
/\
/ \
/ \
(-1,0) / O \ (1,0)
---------------<-------->---------------> x
\ /
\ /
\ /
\/
(0,-1)
Entire diamond, including edges, is included.
Final Answer:
\boxed{\overline B((0,0),1)=\{(x,y)\in\mathbb R^2:|x|+|y|\le1\}}.HPAS 2018 Maths Optional Paper-2 Question 7(a)
Test the convergence of the series
\sum_{n=1}^{\infty} \frac{1}{\sqrt{n!}}Solution:
Consider the positive-term series
\sum_{n=1}^{\infty}\frac1{\sqrt{n!}}.Let
a_n=\frac1{\sqrt{n!}}.Use the ratio test
The ratio test states that for a series of positive terms \sum a_n, if
L=\lim_{n\to\infty}\frac{a_{n+1}}{a_n}<1,then the series converges.
Compute the ratio:
\frac{a_{n+1}}{a_n} = \frac{1/\sqrt{(n+1)!}}{1/\sqrt{n!}} = \frac{\sqrt{n!}}{\sqrt{(n+1)!}}.Since
(n+1)!=(n+1)n!,we obtain
\frac{a_{n+1}}{a_n} = \frac{\sqrt{n!}}{\sqrt{(n+1)n!}} = \frac1{\sqrt{n+1}}.Therefore
L = \lim_{n\to\infty}\frac1{\sqrt{n+1}} = 0.Since
0<1,the ratio test proves that the series is convergent.
Final Answer:
\boxed{\displaystyle\sum_{n=1}^{\infty}\frac1{\sqrt{n!}}\text{ converges.}}HPAS 2018 Maths Optional Paper-2 Question 7(b)
Test the convergence of the series
\sum_{n=1}^{\infty} \left(1+\frac{1}{n}\right)^{-n^2}Solution:
Consider
\sum_{n=1}^{\infty}\left(1+\frac1n\right)^{-n^2}.Let
a_n=\left(1+\frac1n\right)^{-n^2}.Use Cauchy’s root test
The root test states that if
L=\limsup_{n\to\infty}\sqrt[n]{|a_n|}<1,then \sum a_n converges absolutely.
Here a_n>0, and
\sqrt[n]{a_n} = \left[\left(1+\frac1n\right)^{-n^2}\right]^{1/n} = \left(1+\frac1n\right)^{-n}.Use the standard limit
\lim_{n\to\infty}\left(1+\frac1n\right)^n=e.Taking reciprocals gives
\lim_{n\to\infty}\left(1+\frac1n\right)^{-n} = \frac1e.Therefore
L=\frac1e.Since
\frac1e<1,Cauchy’s root test gives convergence.
Final Answer:
\boxed{\displaystyle\sum_{n=1}^{\infty}\left(1+\frac1n\right)^{-n^2}\text{ converges.}}HPAS 2018 Maths Optional Paper-2 Question 8(a)
Write an algorithm and draw a flow chart for integrating \int_{a}^{b} f(x) dx by the Trapezoidal rule, taking a step size h.
Solution:
Trapezoidal rule
Let
I=\int_a^b f(x)\,dx.Take a uniform step size h such that
n=\frac{b-a}{h}is a positive integer. Define
x_i=a+ih,\qquad i=0,1,\ldots,n.The composite trapezoidal rule is
I \approx \frac h2 \left[ f(x_0)+f(x_n) + 2\sum_{i=1}^{n-1}f(x_i) \right].Algorithm
- Start.
- Read a,b,h.
- Compute n=(b-a)/h.
- Set S=f(a)+f(b).
- Set i=1.
- While i\le n-1, compute x=a+ih and update S=S+2f(x).
- Increase i by 1 and repeat Step 6 until all interior ordinates have been used.
- Compute I=(h/2)S.
- Print I.
- Stop.
Equivalent pseudocode
START
Read a, b, h
n = (b - a) / h
S = f(a) + f(b)
i = 1
WHILE i <= n - 1
x = a + i*h
S = S + 2*f(x)
i = i + 1
END WHILE
I = (h/2)*S
Print I
STOP
Flow chart
┌─────────┐
│ START │
└────┬────┘
│
v
┌──────────────────┐
│ Read a, b and h │
└────────┬─────────┘
│
v
┌──────────────────┐
│ n=(b-a)/h │
│ S=f(a)+f(b) │
│ i=1 │
└────────┬─────────┘
│
v
┌────────────┐
│ i <= n-1 ?│
└─────┬──────┘
Yes │ No
│───────────────┐
v v
┌──────────────────┐ ┌──────────────┐
│ x=a+i*h │ │ I=(h/2)*S │
│ S=S+2*f(x) │ └──────┬───────┘
│ i=i+1 │ │
└────────┬─────────┘ v
│ ┌──────────────┐
└─────────────>│ Print I │
loop └──────┬───────┘
│
v
┌─────────┐
│ STOP │
└─────────┘
Final Answer:
The required trapezoidal algorithm evaluates
\boxed{I\approx\frac h2\left[f(a)+f(b)+2\sum_{i=1}^{n-1}f(a+ih)\right],\quad n=\frac{b-a}{h}.}HPAS 2018 Maths Optional Paper-2 Question 8(b)
Write an algorithm and draw a flow chart for finding the value of y at x=x_n for the differential equation \frac{dy}{dx}=f(x,y), taking a step size h, when the initial values of x and y are given, by Euler’s method.
Solution:
Euler’s method
For the initial-value problem
\frac{dy}{dx}=f(x,y),\qquad y(x_0)=y_0,Euler’s method replaces the curve locally by its tangent. With step size h, the recurrence is
x_{i+1}=x_i+h, y_{i+1}=y_i+h\,f(x_i,y_i).Suppose the required point is x=x_n and
n=\frac{x_n-x_0}{h},where n is a non-negative integer.
Algorithm
- Start.
- Read the initial values x_0,y_0, the target value x_n, and the step size h.
- Set x=x_0, y=y_0.
- While x<x_n, compute the slope m=f(x,y).
- Compute the next value y_{\text{new}}=y+h\,m.
- Update x=x+h.
- Update y=y_{\text{new}}.
- Repeat until x=x_n.
- Print y, which is the Euler approximation to y(x_n).
- Stop.
Equivalent pseudocode
START
Read x0, y0, xn, h
x = x0
y = y0
WHILE x < xn
y = y + h*f(x,y)
x = x + h
END WHILE
Print y
STOP
Important implementation note: In an actual program, if y is updated before evaluating f(x,y) for the same step, one must preserve the old x,y values. A safe form is
slope = f(x,y) ynew = y + h*slope x = x + h y = ynew
Flow chart
┌─────────┐
│ START │
└────┬────┘
│
v
┌─────────────────────────┐
│ Read x0, y0, xn and h │
└───────────┬─────────────┘
│
v
┌────────────────┐
│ x=x0, y=y0 │
└───────┬────────┘
│
v
┌───────────┐
│ x < xn ? │
└─────┬─────┘
Yes │ No
│───────────────┐
v v
┌──────────────────────┐ ┌────────────┐
│ m=f(x,y) │ │ Print y │
│ ynew=y+h*m │ └─────┬──────┘
│ x=x+h │ │
│ y=ynew │ v
└──────────┬───────────┘ ┌─────────┐
│ │ STOP │
└──────────────>└─────────┘
loop
Final Answer:
Euler’s recurrence for finding the value at x=x_n is
\boxed{x_{i+1}=x_i+h,\qquad y_{i+1}=y_i+h\,f(x_i,y_i),\quad i=0,1,\ldots,n-1.}