HPAS 2020 Mathematics Optional Paper-2: Complete Solutions
Welcome to the comprehensive solution guide for the Himachal Pradesh Administrative Service (HPAS) 2020 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): Conditional Convergence
- Question 1(b): Group Homomorphisms
- Question 1(c): First Order PDE
- Question 1(d): Euler’s Method
- Question 2(a): Subgroup of Cyclic Group
- Question 2(b): Element of Order 2 (Even Order Group)
- Question 2(c): Abel’s Test & Improper Integral
- Question 3(a): Logarithmic Test & Convergence
- Question 3(b): Second Mean Value Theorem
- Question 3(c): Complex Mapping of a Line
- Question 4(a): Bilinear Transformation
- Question 4(b): Liouville’s Theorem & sin z
- Question 4(c): Connected Metric Space
- Question 5(a): Continuous Function on Compact Space
- Question 5(b): Newton’s Divided Difference
- Question 6(a): Shortest Distance (Parabola & Line)
- Question 6(b): Laplace Transform for Initial Value Problem
- Question 6(c): Laplace Transform of Periodic Function
- Question 7(a): General Solution of PDE
- Question 7(b): Charpit’s Method
- Question 7(c): Regula-Falsi Method
- Question 8(a): Trapezoidal and Simpson’s Rules
- Question 8(b): Extremal of a Functional
- Question 8(c): Runge-Kutta Method Flowchart
HPAS 2020 Maths Optional Paper-2 Question 1(a)
Show that
\sum_{n=1}^{\infty} \frac{(-1)^n}{n-\log n}is a conditionally convergent series.
Solution:
Given:
\sum_{n=1}^{\infty}\frac{(-1)^n}{n-\log n}We must show that the series converges, but not absolutely.
Step 1: Convergence by Leibniz’s alternating-series test
Put b_n=\frac{1}{n-\log n}. For n\ge1, b_n>0. Also,
\lim_{n\to\infty}b_n = \lim_{n\to\infty}\frac{1/n}{1-(\log n)/n} =0,because (\log n)/n\to0.
To check monotonicity, consider g(x)=x-\log x. Then
g'(x)=1-\frac1x=\frac{x-1}{x}>0\qquad(x>1).Thus n-\log n is increasing for n\ge2, and therefore b_n is decreasing. Hence b_n\downarrow0. By Leibniz’s test,
\sum_{n=1}^{\infty}\frac{(-1)^n}{n-\log n}converges.
Step 2: Failure of absolute convergence
The absolute-value series is
\sum_{n=1}^{\infty}\frac{1}{n-\log n}.For n>1, \log n>0, so
n-\log n<n \quad\Longrightarrow\quad \frac1{n-\log n}>\frac1n.Since the harmonic series \sum 1/n diverges, the comparison test gives
\sum_{n=1}^{\infty}\frac{1}{n-\log n}=\infty.Final Answer:
\boxed{\displaystyle\sum_{n=1}^{\infty}\frac{(-1)^n}{n-\log n} \text{ is conditionally convergent.}}HPAS 2020 Maths Optional Paper-2 Question 1(b)
Determine all group homomorphisms from S_3 to \mathbb{Z}_3.
Solution:
Let \phi:S_3\to\mathbb Z_3 be a group homomorphism.
Relevant result: First Isomorphism Theorem
For a homomorphism \phi:G\to H, \ker\phi is normal in G, \operatorname{Im}\phi is a subgroup of H, and
G/\ker\phi\cong\operatorname{Im}\phi.The only subgroups of \mathbb Z_3 are \{0\} and \mathbb Z_3.
Case 1: If \operatorname{Im}\phi=\{0\}, then
\phi(\sigma)=0\qquad(\sigma\in S_3),which is the trivial homomorphism.
Case 2: Suppose \operatorname{Im}\phi=\mathbb Z_3. Then \phi is onto. Since |S_3|=6 and |\mathbb Z_3|=3,
\frac{|S_3|}{|\ker\phi|} = |\operatorname{Im}\phi| =3 \quad\Longrightarrow\quad |\ker\phi|=2.But \ker\phi must be normal in S_3. The order-two subgroups are
\langle(12)\rangle,\qquad \langle(13)\rangle,\qquad \langle(23)\rangle,and none is normal. For example,
(123)(12)(123)^{-1}=(23),so conjugation takes \langle(12)\rangle to a different subgroup. Hence no normal subgroup of order 2 exists, so a surjective homomorphism is impossible.
Final Answer:
\boxed{\phi(\sigma)=0\text{ for every }\sigma\in S_3}is the only homomorphism S_3\to\mathbb Z_3.
HPAS 2020 Maths Optional Paper-2 Question 1(c)
Solve:
x\frac{\partial z}{\partial x} + y\frac{\partial z}{\partial y} = -xy
Solution:
The equation is
xp+yq=-xy,where p=z_x and q=z_y. This is Lagrange’s equation Pp+Qq=R with
P=x,\qquad Q=y,\qquad R=-xy.Auxiliary equations
\frac{dx}{x} = \frac{dy}{y} = \frac{dz}{-xy}.From the first two ratios,
\frac{dx}{x}=\frac{dy}{y} \quad\Longrightarrow\quad \log|x|-\log|y|=C \quad\Longrightarrow\quad \frac{y}{x}=C_1.Thus one first integral is u=y/x.
Along a characteristic let y=kx, where k is constant. Using
\frac{dx}{x}=\frac{dz}{-xy},we get
\frac{dz}{dx} = \frac{-xy}{x} =-y=-kx.Integrating,
z=-\frac{kx^2}{2}+C_2 =-\frac{xy}{2}+C_2.Hence the second first integral is
v=z+\frac{xy}{2}.The general solution is an arbitrary relation F(u,v)=0:
F\left(\frac{y}{x},z+\frac{xy}{2}\right)=0.Equivalently,
z=-\frac{xy}{2}+\phi\left(\frac{y}{x}\right).Verification
Let u=y/x. Then
u_x=-\frac{y}{x^2},\qquad u_y=\frac1x.Therefore
z_x=-\frac y2-\frac{y}{x^2}\phi'(u), \qquad z_y=-\frac x2+\frac1x\phi'(u).Thus
xz_x+yz_y = -\frac{xy}{2}-\frac{y}{x}\phi'(u) -\frac{xy}{2}+\frac{y}{x}\phi'(u) =-xy.Final Answer:
\boxed{z=-\frac{xy}{2}+\phi\left(\frac{y}{x}\right)}on a region where x\ne0.
HPAS 2020 Maths Optional Paper-2 Question 1(d)
Find the value of y(0.5) for the initial value problem \frac{dy}{dx}=y, y(0)=1, using Euler’s method with a step size of h=0.1.
Solution:
For y'=f(x,y), Euler’s method is
y_{n+1}=y_n+h f(x_n,y_n).Here f(x,y)=y and h=0.1, hence
y_{n+1}=y_n+0.1y_n=1.1y_n.Starting with x_0=0,\ y_0=1:
y_1=1+0.1(1)=1.1,\qquad x_1=0.1. y_2=1.1+0.1(1.1)=1.21,\qquad x_2=0.2. y_3=1.21+0.1(1.21)=1.331,\qquad x_3=0.3. y_4=1.331+0.1(1.331)=1.4641,\qquad x_4=0.4. y_5=1.4641+0.1(1.4641)=1.61051,\qquad x_5=0.5.Final Answer:
\boxed{y(0.5)\approx1.61051\approx1.611.}HPAS 2020 Maths Optional Paper-2 Question 2(a)
Prove that any subgroup of a cyclic group is cyclic.
Solution:
Theorem: Every subgroup of a cyclic group is cyclic.
Proof
Let G=\langle a\rangle be cyclic and let H be a subgroup of G.
If H=\{e\}, then H=\langle e\rangle, so H is cyclic.
Now suppose H\ne\{e\}. Since every element of G is a power of a, there is a positive integer n such that a^n\in H. Hence the set
S=\{n\in\mathbb N:a^n\in H\}is nonempty. By the well-ordering principle, let m be its least element. Then a^m\in H, so
\langle a^m\rangle\subseteq H.Take any h\in H. Since G=\langle a\rangle, write
h=a^r,\qquad r\in\mathbb Z.By the division algorithm,
r=qm+s,\qquad 0\le s<m.Therefore
a^s=a^{r-qm}=a^r(a^m)^{-q}.Both a^r and (a^m)^{-q} belong to H, hence a^s\in H. If s>0, this contradicts the minimality of m. Thus s=0.
Hence r=qm and
h=a^r=(a^m)^q\in\langle a^m\rangle.So H\subseteq\langle a^m\rangle. Combining both inclusions,
H=\langle a^m\rangle.Final Answer:
\boxed{\text{Every subgroup of a cyclic group is cyclic.}}HPAS 2020 Maths Optional Paper-2 Question 2(b)
Define the order of an element in a group. Let G be a finite group of even order. Show that G has an element of order 2 and that the number of elements of order 2 in G is odd.
Solution:
Definition: The order of an element a in a group G is the least positive integer n such that
a^n=e,if such an integer exists. Otherwise the element has infinite order.
Let |G| be even. Pair each element g with its inverse g^{-1}. Whenever
g\ne g^{-1},the two elements form a distinct pair \{g,g^{-1}\}. Thus the number of non-self-inverse elements is even.
An element is self-inverse exactly when
g=g^{-1} \quad\Longleftrightarrow\quad g^2=e.Such an element is either the identity e, of order 1, or a nonidentity element of order 2.
Let N be the number of elements of order 2. Then the number of self-inverse elements is N+1. Therefore
|G| = (\text{an even number})+(N+1).Since |G| is even, N+1 must be even. Hence N is odd.
In particular N\ne0, so at least one element of order 2 exists.
Final Answer:
\boxed{\text{A finite group of even order has an odd number of elements of order }2.}HPAS 2020 Maths Optional Paper-2 Question 2(c)
State Abel’s test for convergence of improper integrals. Test the convergence of
\int_{0}^{\infty} \frac{\sin x}{\log(x+2)} dxSolution:
Abel’s test for improper integrals
If \int_a^\infty f(x)\,dx converges and g(x) is monotonic and bounded on [a,\infty), then
\int_a^\infty f(x)g(x)\,dxconverges.
Now consider
I=\int_0^\infty\frac{\sin x}{\log(x+2)}\,dx.For this integral the direct choice f(x)=\sin x does not satisfy Abel’s first hypothesis, because
\int_0^R\sin x\,dx=1-\cos Rhas no limit as R\to\infty. The appropriate convergence test for the displayed integral is Dirichlet’s test.
Dirichlet’s test: If \int_a^t f(x)\,dx is bounded and g(x) decreases to zero, then \int_a^\infty f(x)g(x)\,dx converges.
Here
F(t)=\int_0^t\sin x\,dx=1-\cos t,so |F(t)|\le2. Also
g(x)=\frac1{\log(x+2)}, \qquad g'(x) = -\frac1{(x+2)\{\log(x+2)\}^2} <0,and
\lim_{x\to\infty}g(x)=0.Thus Dirichlet’s test applies and the integral converges.
Final Answer:
\boxed{\displaystyle\int_0^\infty\frac{\sin x}{\log(x+2)}\,dx \text{ converges.}}HPAS 2020 Maths Optional Paper-2 Question 3(a)
State the logarithmic test for convergence of a series. If \{a_n\} is a sequence of real numbers such that \{n^2a_n\} is a convergent sequence, show that \sum_{n=1}^{\infty} a_n is an absolutely convergent series.
Solution:
Logarithmic test
For a positive-term series \sum u_n, if
L=\lim_{n\to\infty}\frac{\log(1/u_n)}{\log n}exists, then the series converges if L>1, diverges if L<1, and the test is inconclusive if L=1.
Now suppose \{n^2a_n\} is convergent. Every convergent real sequence is bounded, so there is M>0 such that
|n^2a_n|\le M \qquad(n\ge1).Hence
|a_n|\le\frac{M}{n^2}.The p-series
\sum_{n=1}^\infty\frac1{n^2}converges because p=2>1. Therefore
\sum_{n=1}^{\infty}\frac{M}{n^2}also converges. By comparison,
\sum_{n=1}^{\infty}|a_n|converges.
Final Answer:
\boxed{\{n^2a_n\}\text{ convergent }\Longrightarrow \sum_{n=1}^{\infty}a_n\text{ is absolutely convergent.}}HPAS 2020 Maths Optional Paper-2 Question 3(b)
State the second mean value theorem of integral calculus. Let f:[0,1] \to \mathbb{R} be a continuous function such that \int_{0}^{1} |f(x)| dx = 0. Show that f is identically zero on [0,1].
Solution:
Second Mean Value Theorem of Integral Calculus
If f is monotonic on [a,b] and g is integrable, then there exists \xi\in[a,b] such that
\int_a^b f(x)g(x)\,dx = f(a)\int_a^\xi g(x)\,dx + f(b)\int_\xi^b g(x)\,dx.Now suppose f:[0,1]\to\mathbb R is continuous and
\int_0^1|f(x)|\,dx=0.Assume, for contradiction, that f(c)\ne0 for some c\in[0,1]. Then |f(c)|>0. Put
\varepsilon=\frac{|f(c)|}{2}.By continuity of |f| at c, there exists \delta>0 such that
|x-c|<\delta \quad\Longrightarrow\quad |f(x)|>\frac{|f(c)|}{2}.Let J=(c-\delta,c+\delta)\cap[0,1]. This interval has positive length. Therefore
\int_0^1|f(x)|\,dx \ge \int_J|f(x)|\,dx \ge \frac{|f(c)|}{2}\,|J| >0,contradicting the hypothesis. Hence no such c exists.
Final Answer:
\boxed{f(x)=0\quad\text{for every }x\in[0,1].}HPAS 2020 Maths Optional Paper-2 Question 3(c)
Let f(z) = \frac{z-1}{z+1} and let L be the line in the z-plane through z=0 and z=1+i. Find the image of L under f.
Solution:
Let
z=x+iy,\qquad w=u+iv, \qquad w=\frac{z-1}{z+1}.The line through 0 and 1+i is
y=x.Invert the transformation:
w(z+1)=z-1 \quad\Longrightarrow\quad z=\frac{1+w}{1-w}.Substituting w=u+iv,
z=\frac{1+u+iv}{1-u-iv}.Multiplying numerator and denominator by 1-u+iv,
z= \frac{1-u^2-v^2+2iv}{(1-u)^2+v^2}.Thus
x=\frac{1-u^2-v^2}{(1-u)^2+v^2}, \qquad y=\frac{2v}{(1-u)^2+v^2}.Since y=x,
2v=1-u^2-v^2.Hence
u^2+v^2+2v=1 \quad\Longrightarrow\quad u^2+(v+1)^2=2.This is the circle with centre (0,-1) and radius \sqrt2. The point w=1 is the image of the point at infinity on the line and is not attained by a finite point of L.
Final Answer:
\boxed{u^2+(v+1)^2=2}HPAS 2020 Maths Optional Paper-2 Question 4(a)
Find the bilinear transformation which maps the points 0, i, 1+i onto 2i, -1, and 0, respectively.
Solution:
Let the required bilinear transformation be
w=\frac{az+b}{cz+d}, \qquad ad-bc\ne0.The given mappings are
0\mapsto2i,\qquad i\mapsto-1,\qquad 1+i\mapsto0.Since a common nonzero multiplier in a,b,c,d does not change the transformation, take d=1.
From z=0\mapsto w=2i,
b=2i.From z=1+i\mapsto w=0, the numerator vanishes:
a(1+i)+2i=0 \quad\Longrightarrow\quad a=-\frac{2i}{1+i}.Rationalizing,
a = -\frac{2i(1-i)}{2} =-1-i.Now use z=i\mapsto w=-1:
-1 = \frac{(-1-i)i+2i}{ci+1}.Since
(-1-i)i=1-i,the numerator equals 1+i. Therefore
-1=\frac{1+i}{1+ci} \quad\Longrightarrow\quad 1+ci=-1-i.Thus
ci=-2-i, \qquad c=\frac{-2-i}{i}=-1+2i.Hence
w= \frac{(-1-i)z+2i}{(-1+2i)z+1}.Verification
For z=0, w=2i. For z=1+i,
(-1-i)(1+i)+2i=-2i+2i=0,so w=0. For z=i,
w=\frac{1+i}{-1-i}=-1.Final Answer:
\boxed{w=\frac{(-1-i)z+2i}{(-1+2i)z+1}.}HPAS 2020 Maths Optional Paper-2 Question 4(b)
Prove that every bounded entire function is constant. Is f(z) = \sin z bounded on \mathbb{C}? Support your answer.
Solution:
Liouville’s Theorem: Every bounded entire function is constant.
Proof
Let f be entire and suppose
|f(z)|\le M \qquad(z\in\mathbb C)for some M>0. Fix z_0\in\mathbb C. Since f is entire, Cauchy’s integral formula for the derivative gives, on the circle |z-z_0|=R,
f'(z_0) = \frac1{2\pi i} \int_{|z-z_0|=R} \frac{f(z)}{(z-z_0)^2}\,dz.Taking absolute values and using the ML-estimate,
|f'(z_0)| \le \frac1{2\pi} \cdot \frac{M}{R^2} \cdot 2\pi R = \frac{M}{R}.This is true for every R>0. Letting R\to\infty,
|f'(z_0)|=0,hence f'(z_0)=0. Since z_0 was arbitrary, f'\equiv0, so f is constant.
Is \sin z bounded?
Take z=iy, where y\in\mathbb R. Then
\sin(iy) = \frac{e^{-y}-e^y}{2i} = i\sinh y.Therefore
|\sin(iy)|=|\sinh y| = \left|\frac{e^y-e^{-y}}2\right|.As y\to\infty, this tends to infinity. Hence \sin z is not bounded on \mathbb C.
Final Answer:
\boxed{\text{Every bounded entire function is constant, but }\sin z \text{ is unbounded on }\mathbb C.}HPAS 2020 Maths Optional Paper-2 Question 4(c)
Define a connected metric space. Prove that every closed interval of the real line \mathbb{R} is connected.
Solution:
Definition: A metric space (X,d) is connected if it cannot be written as
X=U\cup Vwhere U and V are nonempty, disjoint, open subsets of X. Equivalently, the only subsets of X that are both open and closed are \varnothing and X.
We prove that [a,b] is connected.
If a=b, the interval is a singleton and is connected. Assume a<b. Suppose, for contradiction, that
[a,b]=U\cup V,where U,V are nonempty, disjoint and relatively open. Then each is also relatively closed because it is the complement of the other.
Choose u\in U and v\in V. Interchange them if necessary so that u<v. Let
S=U\cap[u,v].The set S is nonempty and bounded above by v. Let
c=\sup S.Because U is closed in [a,b] and points of S approach c, we have c\in U. Since U is relatively open, there exists \varepsilon>0 such that
(c-\varepsilon,c+\varepsilon)\cap[a,b]\subset U.If c<v, choose \eta>0 with
\eta<\min\{\varepsilon,v-c\}.Then c+\eta\in S, contradicting the fact that c is an upper bound of S. Hence c=v. But c\in U, so v\in U, while by choice v\in V, contradicting U\cap V=\varnothing.
Therefore no separation exists.
Final Answer:
\boxed{\text{Every closed interval }[a,b]\subset\mathbb R\text{ is connected.}}HPAS 2020 Maths Optional Paper-2 Question 5(a)
Define a continuous function between metric spaces. Prove that any real-valued continuous function on a compact metric space is bounded.
Solution:
Definition: Let (X,d_X) and (Y,d_Y) be metric spaces. A function f:X\to Y is continuous at x_0\in X if, for every \varepsilon>0, there exists \delta>0 such that
d_X(x,x_0)<\delta \quad\Longrightarrow\quad d_Y(f(x),f(x_0))<\varepsilon.Let X be compact and f:X\to\mathbb R continuous. We prove that f is bounded.
For each x\in X, apply continuity with \varepsilon=1. There exists \delta_x>0 such that
d(y,x)<\delta_x \quad\Longrightarrow\quad |f(y)-f(x)|<1.Hence, whenever y\in B(x,\delta_x),
|f(y)| \le |f(y)-f(x)|+|f(x)| <1+|f(x)|.The balls \{B(x,\delta_x):x\in X\} form an open cover of X. By compactness, choose a finite subcover
X\subset B(x_1,\delta_{x_1})\cup\cdots\cup B(x_n,\delta_{x_n}).Set
M=1+\max_{1\le i\le n}|f(x_i)|.For any y\in X, y lies in some B(x_j,\delta_{x_j}). Therefore
|f(y)| <1+|f(x_j)| \le M.Thus f is bounded on X.
Final Answer:
\boxed{\text{Every real-valued continuous function on a compact metric space is bounded.}}HPAS 2020 Maths Optional Paper-2 Question 5(b)
Obtain the interpolating polynomial by Newton’s divided difference formula for the following data. Also, find the value of f(3.5).
x: -3, -1, 0, 3, 5
f(x): -30, -22, -12, 330, 3458
Solution:
The data are
\begin{array}{c|ccccc} x & -3 & -1 & 0 & 3 & 5\\ \hline f(x) & -30 & -22 & -12 & 330 & 3458 \end{array}Newton’s divided-difference formula
\begin{aligned} P_n(x)={}&f[x_0] +(x-x_0)f[x_0,x_1]\\ &+(x-x_0)(x-x_1)f[x_0,x_1,x_2]+\cdots. \end{aligned}Take x_0=-3,\ x_1=-1,\ x_2=0,\ x_3=3,\ x_4=5.
First divided differences
f[x_0,x_1]=\frac{-22+30}{2}=4, \qquad f[x_1,x_2]=\frac{-12+22}{1}=10, f[x_2,x_3]=\frac{330+12}{3}=114, \qquad f[x_3,x_4]=\frac{3458-330}{2}=1564.Second divided differences
f[x_0,x_1,x_2]=\frac{10-4}{3}=2, f[x_1,x_2,x_3]=\frac{114-10}{4}=26, \qquad f[x_2,x_3,x_4]=\frac{1564-114}{5}=290.Third divided differences
f[x_0,x_1,x_2,x_3]=\frac{26-2}{6}=4, f[x_1,x_2,x_3,x_4]=\frac{290-26}{6}=44.Fourth divided difference
f[x_0,x_1,x_2,x_3,x_4] = \frac{44-4}{8}=5.Therefore
\begin{aligned} P_4(x)={}&-30+4(x+3)+2(x+3)(x+1)\\ &+4(x+3)(x+1)x\\ &+5(x+3)(x+1)x(x-3). \end{aligned}Expanding,
P_4(x)=5x^4+9x^3-27x^2-21x-12.At x=3.5,
\begin{aligned} P_4(3.5) ={}&-30+4(6.5)+2(6.5)(4.5)\\ &+4(6.5)(4.5)(3.5)\\ &+5(6.5)(4.5)(3.5)(0.5). \end{aligned}Now
-30+26=-4,\quad 2(6.5)(4.5)=58.5, 4(6.5)(4.5)(3.5)=409.5, 5(6.5)(4.5)(3.5)(0.5)=255.9375.Hence
P_4(3.5)=-4+58.5+409.5+255.9375=719.9375.Final Answer:
\boxed{P_4(x)=5x^4+9x^3-27x^2-21x-12,\qquad f(3.5)=719.9375.}HPAS 2020 Maths Optional Paper-2 Question 6(a)
Find the shortest distance between the parabola y=x^2 and the straight line x-y=5.
Solution:
The parabola is y=x^2 and the line is x-y-5=0.
Take a general point P=(t,t^2) on the parabola. The perpendicular distance from (x_1,y_1) to Ax+By+C=0 is
d=\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}.Therefore
d(t) = \frac{|t-t^2-5|}{\sqrt2}.Now
t-t^2-5 = -\left(t^2-t+5\right) = -\left[\left(t-\frac12\right)^2+\frac{19}{4}\right]<0.Hence
d(t)=\frac{t^2-t+5}{\sqrt2}.Differentiate:
d'(t)=\frac{2t-1}{\sqrt2}.For an extremum,
2t-1=0 \quad\Longrightarrow\quad t=\frac12.Also
d''(t)=\sqrt2>0,so this gives the minimum distance.
Therefore
\begin{aligned} d_{\min} &= \frac{\frac14-\frac12+5}{\sqrt2}\\ &= \frac{19}{4\sqrt2} = \frac{19\sqrt2}{8}. \end{aligned}Final Answer:
\boxed{d_{\min}=\frac{19}{4\sqrt2}=\frac{19\sqrt2}{8}.}HPAS 2020 Maths Optional Paper-2 Question 6(b)
Solve the following initial value problem using the Laplace transform:
\frac{d^2y}{dx^2} - 3\frac{dy}{dx} - 4y = x^2with y(0)=2 and y'(0)=1.
Solution:
The initial-value problem is
y''-3y'-4y=x^2, \qquad y(0)=2,\quad y'(0)=1.Let \mathcal L\{y\}=Y(s). We use
\mathcal L\{y'\}=sY-y(0), \qquad \mathcal L\{y''\}=s^2Y-sy(0)-y'(0),and
\mathcal L\{x^2\}=\frac{2}{s^3}.Taking transforms,
(s^2Y-2s-1)-3(sY-2)-4Y=\frac2{s^3}.Hence
(s^2-3s-4)Y-2s+5=\frac2{s^3},so
(s^2-3s-4)Y=2s-5+\frac2{s^3}.Since s^2-3s-4=(s-4)(s+1),
Y(s) = \frac{2s^4-5s^3+2}{s^3(s-4)(s+1)}.Resolving into partial fractions,
Y(s) = \frac{97}{160}\frac1{s-4} +\frac95\frac1{s+1} -\frac{13}{32}\frac1s +\frac38\frac1{s^2} -\frac12\frac1{s^3}.Taking inverse transforms term by term,
\begin{aligned} y(x) ={}& \frac{97}{160}e^{4x} +\frac95e^{-x} -\frac{13}{32} +\frac38x -\frac12\left(\frac{x^2}{2}\right)\\ ={}& \frac{97}{160}e^{4x} +\frac95e^{-x} -\frac{13}{32} +\frac38x -\frac{x^2}{4}. \end{aligned}Verification of the initial conditions
y(0)=\frac{97}{160}+\frac95-\frac{13}{32} =\frac{97+288-65}{160}=2.Also
y'(x)=\frac{97}{40}e^{4x}-\frac95e^{-x}+\frac38-\frac x2,so
y'(0)=\frac{97}{40}-\frac95+\frac38 =\frac{97-72+15}{40}=1.Final Answer:
\boxed{ y(x)= \frac{97}{160}e^{4x} +\frac95e^{-x} -\frac{13}{32} +\frac38x -\frac{x^2}{4}. }HPAS 2020 Maths Optional Paper-2 Question 6(c)
Find the Laplace transform of the following periodic function f(x) with period 2\pi:
f(x) = \begin{cases} x & , \ 0 \le x \le \pi \\ 2\pi - x & , \ \pi \le x \le 2\pi \end{cases}Solution:
The function has period T=2\pi. For a periodic function,
\mathcal L\{f(x)\} = \frac{\int_0^T e^{-sx}f(x)\,dx}{1-e^{-sT}}.Therefore
F(s) = \frac1{1-e^{-2\pi s}} \left[ \int_0^\pi xe^{-sx}\,dx + \int_\pi^{2\pi}(2\pi-x)e^{-sx}\,dx \right].First integral
\int xe^{-sx}\,dx = -\frac{x}{s}e^{-sx}-\frac1{s^2}e^{-sx}.Hence
I_1 = \int_0^\pi xe^{-sx}\,dx = \frac1{s^2} - e^{-\pi s}\left(\frac{\pi}{s}+\frac1{s^2}\right).Second integral
An antiderivative is
\int(2\pi-x)e^{-sx}\,dx = \frac{x-2\pi}{s}e^{-sx} +\frac1{s^2}e^{-sx}.Therefore
I_2 = e^{-\pi s}\left(\frac{\pi}{s}-\frac1{s^2}\right) +\frac1{s^2}e^{-2\pi s}.Adding,
I_1+I_2 = \frac{1-2e^{-\pi s}+e^{-2\pi s}}{s^2} = \frac{(1-e^{-\pi s})^2}{s^2}.Thus
F(s) = \frac{(1-e^{-\pi s})^2} {s^2(1-e^{-2\pi s})}.Using
1-e^{-2\pi s} = (1-e^{-\pi s})(1+e^{-\pi s}),we obtain
F(s)= \frac{1-e^{-\pi s}} {s^2(1+e^{-\pi s})}.Final Answer:
\boxed{ \mathcal L\{f(x)\} = \frac{1-e^{-\pi s}}{s^2(1+e^{-\pi s})} = \frac1{s^2}\tanh\left(\frac{\pi s}{2}\right). }HPAS 2020 Maths Optional Paper-2 Question 7(a)
Find the general solution of the following partial differential equation:
D(D^2 - D' + 1)(D + 2D' + 1)^3 z = 0where D \equiv \frac{\partial}{\partial x} and D' \equiv \frac{\partial}{\partial y}.
Solution:
The PDE is
D(D^2-D'+1)(D+2D'+1)^3z=0,where D=\partial/\partial x and D'=\partial/\partial y. Since the operators have constant coefficients, their contributions may be treated separately.
1. Factor D
Dz_1=0 \quad\Longrightarrow\quad \frac{\partial z_1}{\partial x}=0,so
z_1=\phi_1(y).2. Factor D^2-D'+1
We require
z_{xx}-z_y+z=0,or
z_y=z_{xx}+z.Put z_2=e^yU(x,y). Then
(z_2)_y=e^y(U+U_y), \qquad (z_2)_{xx}=e^yU_{xx}.Substitution yields
U_y=U_{xx}.Thus U is any solution of the one-dimensional heat equation. A standard spectral representation is
U(x,y)=\int_\Gamma A(\lambda)e^{\lambda x+\lambda^2y}\,d\lambda,so
z_2 = \int_\Gamma A(\lambda)e^{\lambda x+(\lambda^2+1)y}\,d\lambda.3. Repeated factor (D+2D'+1)^3
First solve
z_x+2z_y+z=0.The characteristic equations are
\frac{dx}{1}=\frac{dy}{2}=\frac{dz}{-z}.From the first two ratios,
y-2x=C.From the first and third,
\frac{dz}{z}=-dx \quad\Longrightarrow\quad z=e^{-x}\phi(y-2x).Because the factor occurs three times, the repeated-factor rule introduces polynomial multipliers of degrees 0,1,2 in x. Hence
z_3 = e^{-x} \left[ \phi_2(y-2x) +x\phi_3(y-2x) +x^2\phi_4(y-2x) \right].Combining the three parts,
\begin{aligned} z(x,y)={}& \phi_1(y) + \int_\Gamma A(\lambda)e^{\lambda x+(\lambda^2+1)y}\,d\lambda\\ &+ e^{-x}\left[ \phi_2(y-2x)+x\phi_3(y-2x)+x^2\phi_4(y-2x) \right]. \end{aligned}Final Answer:
\boxed{ \begin{aligned} z={}&\phi_1(y) +\int_\Gamma A(\lambda)e^{\lambda x+(\lambda^2+1)y}\,d\lambda\\ &+e^{-x}\left[ \phi_2(y-2x)+x\phi_3(y-2x)+x^2\phi_4(y-2x) \right]. \end{aligned}}HPAS 2020 Maths Optional Paper-2 Question 7(b)
Apply Charpit’s method to find the complete integral of the partial differential equation xp^2 + yq^2 = z, where p = \frac{\partial z}{\partial x} and q = \frac{\partial z}{\partial y}.
Solution:
The PDE is
xp^2+yq^2=z, \qquad p=z_x,\quad q=z_y.Write
F=xp^2+yq^2-z=0.Charpit’s equations
\frac{dx}{F_p} = \frac{dy}{F_q} = \frac{dz}{pF_p+qF_q} = \frac{-dp}{F_x+pF_z} = \frac{-dq}{F_y+qF_z}.Here
F_p=2xp,\quad F_q=2yq,\quad F_x=p^2,\quad F_y=q^2,\quad F_z=-1.Therefore
\frac{dx}{2xp} = \frac{dy}{2yq} = \frac{dz}{2xp^2+2yq^2} = \frac{-dp}{p^2-p} = \frac{-dq}{q^2-q}.Using the x,p pair,
\frac{dx}{2xp} = -\frac{dp}{p(p-1)} = \frac{dp}{p(1-p)}.Canceling p,
\frac{dx}{2x}=\frac{dp}{1-p}.Integrating,
\frac12\log x=-\log|1-p|+C,hence
\sqrt{x}(1-p)=a.Thus
p=1-\frac{a}{\sqrt x}.Similarly, from the y,q pair,
q=1-\frac{b}{\sqrt y}.Since p=z_x,
z_x=1-\frac{a}{\sqrt x}.Integrating with respect to x,
z=x-2a\sqrt x+\phi(y).Now q=z_y=\phi'(y), so
\phi'(y)=1-\frac{b}{\sqrt y}.Integrating,
\phi(y)=y-2b\sqrt y+C.Hence
z=x+y-2a\sqrt x-2b\sqrt y+C.Now
xp^2 = x\left(1-\frac a{\sqrt x}\right)^2 = x-2a\sqrt x+a^2,and similarly
yq^2=y-2b\sqrt y+b^2.Thus the PDE requires
C=a^2+b^2.Therefore
z=x+y-2a\sqrt x-2b\sqrt y+a^2+b^2 =(\sqrt x-a)^2+(\sqrt y-b)^2.Final Answer:
\boxed{z=(\sqrt x-a)^2+(\sqrt y-b)^2,}where a,b are arbitrary constants.
HPAS 2020 Maths Optional Paper-2 Question 7(c)
Find a real root of the equation xe^x - \cos x = 0 using the Regula-Falsi method.
Solution:
Let
f(x)=xe^x-\cos x.We first locate a sign change:
f(0.5)\approx-0.05322193, \qquad f(0.6)\approx0.26793567.Hence a root lies in (0.5,0.6).
Regula-Falsi formula
For f(a)f(b)<0,
x=\frac{af(b)-bf(a)}{f(b)-f(a)}.Iteration 1
x_1 = \frac{0.5(0.26793567)-0.6(-0.05322193)} {0.26793567+0.05322193} \approx0.51657190. f(x_1)\approx-0.00360274.Iteration 2
Using a=0.51657190, b=0.6,
x_2\approx0.51767882, \qquad f(x_2)\approx-0.00023893.Iteration 3
x_3\approx0.51775216, \qquad f(x_3)\approx-1.5824\times10^{-5}.Iteration 4
x_4\approx0.51775702, \qquad f(x_4)\approx-1.0479\times10^{-6}.Iteration 5
x_5\approx0.51775734, \qquad f(x_5)\approx-6.94\times10^{-8}.The successive values agree to six decimal places.
Final Answer:
\boxed{x\approx0.517757.}HPAS 2020 Maths Optional Paper-2 Question 8(a)
Evaluate the integral
I = \int_{0}^{1} \frac{dx}{1+x}correct to three decimal places by using the trapezoidal rule and Simpson’s one-third rule, taking h=0.25.
Solution:
We have to approximate
I=\int_0^1\frac{dx}{1+x}with step size h=0.25. The number of subintervals is
n=\frac{1-0}{0.25}=4.The tabulated values are
\begin{array}{c|ccccc} x & 0 & 0.25 & 0.50 & 0.75 & 1\\ \hline f(x)=\frac1{1+x} &1 &0.8 &0.66666667 &0.57142857 &0.5 \end{array}(i) Composite trapezoidal rule
I_T = \frac h2 \left[ f_0+f_4+2(f_1+f_2+f_3) \right].Substituting the values,
\begin{aligned} I_T &= \frac{0.25}{2} \left[ 1+0.5 +2(0.8+0.66666667+0.57142857) \right]\\ &= 0.125 \left[ 1.5+2(2.03809524) \right]\\ &= 0.125(5.57619048)\\ &= 0.69702381. \end{aligned}Hence, correct to three decimal places,
I_T\approx0.697.(ii) Simpson’s one-third rule
Since n=4 is even,
I_S = \frac h3 \left[ f_0+f_4+4(f_1+f_3)+2f_2 \right].Therefore
\begin{aligned} I_S &= \frac{0.25}{3} \left[ 1+0.5+4(0.8+0.57142857)+2(0.66666667) \right]\\ &= \frac1{12} \left[ 1.5+5.48571428+1.33333334 \right]\\ &= \frac{8.31904762}{12}\\ &= 0.69325397. \end{aligned}Hence, correct to three decimal places,
I_S\approx0.693.For reference, the exact value is \log2\approx0.693147, so Simpson’s approximation is much closer.
Final Answer:
\boxed{ I_{\text{trapezoidal}}\approx0.697,\qquad I_{\text{Simpson }1/3}\approx0.693. }HPAS 2020 Maths Optional Paper-2 Question 8(b)
Find the extremal of the following functional
v[y(x)] = \int_{0}^{1} (2y + (y'')^2) dxthat satisfies the conditions y(0)=0, y'(0)=1, y(1)=1, and y'(1)=1.
Solution:
The functional is
v[y]=\int_0^1\left(2y+(y'')^2\right)\,dx,subject to
y(0)=0,\quad y'(0)=1,\quad y(1)=1,\quad y'(1)=1.Since the integrand contains y'', we use the Euler-Poisson equation.
Euler-Poisson equation
For J=\int F(x,y,y',y'')\,dx, an extremal satisfies
\frac{\partial F}{\partial y} - \frac d{dx}\left(\frac{\partial F}{\partial y'}\right) + \frac{d^2}{dx^2}\left(\frac{\partial F}{\partial y''}\right) =0.Here
F=2y+(y'')^2,so
\frac{\partial F}{\partial y}=2,\qquad \frac{\partial F}{\partial y'}=0,\qquad \frac{\partial F}{\partial y''}=2y''.Hence
2+\frac{d^2}{dx^2}(2y'')=0 \quad\Longrightarrow\quad y^{(4)}=-1.Integrate four times
y'''=-x+C_1, y''=-\frac{x^2}{2}+C_1x+C_2, y'=-\frac{x^3}{6}+\frac{C_1x^2}{2}+C_2x+C_3, y=-\frac{x^4}{24}+\frac{C_1x^3}{6}+\frac{C_2x^2}{2}+C_3x+C_4.From y(0)=0, C_4=0. From y'(0)=1, C_3=1. Thus
y=-\frac{x^4}{24}+\frac{C_1x^3}{6}+\frac{C_2x^2}{2}+x.Using y(1)=1,
-\frac1{24}+\frac{C_1}{6}+\frac{C_2}{2}+1=1,hence
4C_1+12C_2=1. \tag{1}Also
y'=-\frac{x^3}{6}+\frac{C_1x^2}{2}+C_2x+1.Using y'(1)=1,
-\frac16+\frac{C_1}{2}+C_2+1=1,so
3C_1+6C_2=1. \tag{2}Twice (2) gives 6C_1+12C_2=2. Subtracting (1),
2C_1=1 \quad\Longrightarrow\quad C_1=\frac12.Then from (2),
\frac32+6C_2=1 \quad\Longrightarrow\quad C_2=-\frac1{12}.Therefore
y = -\frac{x^4}{24} +\frac{x^3}{12} -\frac{x^2}{24} +x.Factoring the polynomial correction,
y=x-\frac{x^2(x-1)^2}{24}.Final Answer:
\boxed{y(x)=x-\frac{x^2(x-1)^2}{24}.}HPAS 2020 Maths Optional Paper-2 Question 8(c)
Write a flow chart in C language for the Runge-Kutta method of the fourth order.
Solution:
For the initial-value problem
\frac{dy}{dx}=f(x,y),\qquad y(x_0)=y_0,the classical fourth-order Runge-Kutta method uses four increments.
RK4 formula
k_1=h f(x_n,y_n), k_2=h f\left(x_n+\frac h2,\ y_n+\frac{k_1}{2}\right), k_3=h f\left(x_n+\frac h2,\ y_n+\frac{k_2}{2}\right), k_4=h f(x_n+h,\ y_n+k_3).Then
y_{n+1} = y_n+\frac{k_1+2k_2+2k_3+k_4}{6}, \qquad x_{n+1}=x_n+h.Flow chart
START
|
v
Read x0, y0, h, xn
|
v
Set x = x0, y = y0
|
v
Is x < xn ?
/ \
No Yes
| |
| v
| k1 = h*f(x,y)
| k2 = h*f(x+h/2, y+k1/2)
| k3 = h*f(x+h/2, y+k2/2)
| k4 = h*f(x+h, y+k3)
| |
| v
| y = y + (k1+2*k2+2*k3+k4)/6
| x = x + h
| |
| +----------------------+
| |
+---------------------------+
|
v
Print x, y
|
v
STOP
C-language form corresponding to the flow chart
#include <stdio.h>
#include <math.h>
double f(double x, double y)
{
/* Replace by the given differential equation y' = f(x,y). */
return y;
}
int main(void)
{
double x, y, h, xn;
double k1, k2, k3, k4;
printf("Enter x0, y0, h and final x: ");
scanf("%lf %lf %lf %lf", &x, &y, &h, &xn);
while (x < xn)
{
if (x + h > xn)
h = xn - x;
k1 = h * f(x, y);
k2 = h * f(x + h/2.0, y + k1/2.0);
k3 = h * f(x + h/2.0, y + k2/2.0);
k4 = h * f(x + h, y + k3);
y = y + (k1 + 2.0*k2 + 2.0*k3 + k4)/6.0;
x = x + h;
}
printf("x = %.6f, y = %.6f\n", x, y);
return 0;
}
The four slopes are calculated in sequence, combined in the weights 1:2:2:1, and the process is repeated until the final value of x is reached.
Final Answer:
\boxed{ y_{n+1}=y_n+\frac{k_1+2k_2+2k_3+k_4}{6}. }