# Solutions Q 1-11

## Contents

# Solutions Q 1-11#

```
# import all python add-ons etc that will be needed later on
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from sympy import *
init_printing() # allows printing of SymPy results in typeset maths format
plt.rcParams.update({'font.size': 14}) # set font size for plots
```

## Q1 answer#

Rearranging the equation produces \(V=1000/p \) and then a new function for the increased volume is produced by adding the small quantities \(\delta V\) and \(\delta p\),

and the change in volume with pressure is therefore

The change in volume when the pressure changes from \(1 \to 1.1\) bar is \(-1000 \cdot 0.1/1.1 = -90.91\,\mathrm{ m^3}\) and is negative because the pressure has increased.

## Q2 answer#

(a) The new frequency is lower when \(μ\) is increased, because \(\nu\) and \(\mu\) are in a reciprocal relationship. Therefore

and the change is

and the relative change

This is a very awkward expression to simplify because, by letting

This is incorrect because the square root terms are not taken to the limit properly. Rewriting the equation as

enables the limit to be taken because \(\delta\mu/\mu \lt 1\). Series expansions are described in Chapter 5 but using the result given in the question

therefore

and you can justify halting the expansion at the first term because \(\delta\mu/\mu \lt 1\) and therefore \((\delta\mu/\mu)^2\) is even smaller.

(b) Using values in the question, the relative change \(\delta\nu/\nu = 0.01\) and before calculating the frequency this must be changed into s\(^{-1}\) from cm\(^{-1}\). The wavenumber or cm\(^{-1}\) is frequently used in spectroscopy because its numerical value is easier to remember and use than a frequency expressed in s\(^{-1}\). The conversion requires us to multiply by \(c\), the speed of light, hence \(5889.0\,\mathrm{ cm^{-1}} \equiv 2.997924 \cdot 10^{10}\,\mathrm{ cm\, s^{-1} \cdot 5889.0\, cm^{-1}} = 1.7655 \cdot 10^{14}\,\mathrm{ s^{-1}}\). The frequency change is \(58.89\,\mathrm{ cm^{-1}}\) or \(1.7655 \cdot 10^{12}\,\mathrm{ s^{-1}}\).

The problem could perhaps more usefully have been posed the opposite way round; by knowing that the resolution of a spectrometer is \(\nu \pm \delta \nu\) will it be possible to observe a line from two isotopic species whose mass differ by \(1\)%?

## Q3 answer#

The change in volume is \(\displaystyle V-V_0 =\delta V = V_0\beta \delta T \)

and so the change in length of the column of liquid is \(\displaystyle \delta L =\frac{V_0}{\pi r^2}\beta\delta T\)

for \(\delta T\) change in temperature. Substituting for the parameters produces

With Hg this corresponds to a sensitivity of \(16\,\mathrm{ mm\, K^{-1}}\) and with ethanol \(95.5\,\mathrm{ mm\, K^{-1}}\). A fine capillary over a bulb of mercury is used in medical thermometers to make the readings very sensitive around body temperature. The capillary is so thin that violent shaking of the thermometer is necessary to overcome the capillary forces to return the mercury to its reservoir after use.

## Q4 answer#

\(\displaystyle \begin{array}{lll}\\ \hline (a)&(i) &dy/dx &= &12x^3 + \cos(x)\\ &(ii) &dy/dx &= &-40x{-5} + 10x\\ &(iii) &\displaystyle \frac{dy}{dx}&=&\displaystyle \frac{1}{x}-\frac{1}{ax^2}\\ &(iv) &dy/dx &= &ae^{ax} + 2x\\ \hline (b)& (i) &dy/da&=&0\\ &(ii) &dy/da&=&xe^{ax}\\ &(iii) &dy/da&=&x^2\\ \hline \end{array}\)

(c) Differentiating \(\sin(ax)\) five times gives the sequence

\(\displaystyle \begin{array}\\ dy/dx &= a \cos(ax)& d^2y/dx^2 &= -a^2 \sin(ax)&d^3y/dx^3&=-a^3\cos(ax)\\ d^4y/dx^4&=a^4\sin(ax)& d^5y/dx^5&=a^5\cos(ax)\end{array}\)

The identity \(\cos(ax) = \sin(ax + n\pi/2)\) is now needed and this changes the odd numbered results into sines, for example \(d^5y/dx^5 = a^5 \sin(ax + 5\pi/2)\). The result follows by inspection \(d^ny/dx^n = a^n \sin(ax + n\pi/2)\) with \(n \ge\) 1.

## Q5#

Using the rules for differentiating \(x^n\), start by differentiating once, twice, and so on to obtain

A pattern is becoming clear and can be generalized to the \(m\)^{th} differential without actually doing it;

The product \(n(n - 1)(n - 2)\cdots(n - m + 1)\) looks a little like the factorial for \(n\), which can be written as

However, the ratio of factorials in the equation is found by trial and error and by testing with some real numbers if necessary. This approach is sometimes called ‘by inspection’ in textbooks. Making the \(n^{th}\) term by letting \(n = m\), produces \(x^{n - m} = 1\) and because \(0! = 1\) the result is \(\displaystyle \frac{d^n}{dx^n}x^n=n!\).

This type of approach is general in the sense that to find \(n\) terms an intermediate term \(m\) is chosen to be a general term and then \(m = n\) is made in the last step. The code using SymPy is given next.

```
x,y,n = symbols('x y n') # define symbols to use
ans = diff(x**n,x,x,x,x,x) # differentiate 5 times
factor(ans)
```

```
print(ans.subs(n,5),factorial(5) ) # substitute into ans and check answer is a factorial
```

```
120 120
```

## Q6 answer#

As \(\displaystyle \frac{dy}{dx}=-ae^{-ax}=-ay,\; \frac{d^2y}{dx^2}=a^2e^{-ax}=a^2y,\; \frac{d^3y}{dx^3}=-a^3y \)

by induction the \(n^{th}\) term is going to be \(\displaystyle \frac{d^ny}{dx^n}=(-1)^na^ny\),

where \((-1)^n\) makes the sign of the differential negative for odd \(n\) and positive for even \(n\); for example \((-1)^{(-1)} = 1\).

## Q7 answer#

(a) As \(pV=nRT\) for \(n\) moles of gas, then \(p=nRT/V\). Differentiating with respect to \(V\) produces

where, by comparison with the equation in the question, the constant \(c = -nRT\).

(b) Rearranging the ideal gas equation to \(V=nRT/p\) leads to \(\displaystyle \frac{dV}{dp}=-\frac{nR}{p^2}\).

(c) By substitution \(\displaystyle \frac{dV}{dp}=-\frac{V^2}{nRT}\) then by comparison with (a) \(\displaystyle \frac{dV}{dp}=\left( \frac{dp}{dV}\right)^{-1}\).

This latter result is in fact quite general and \(\displaystyle \frac{dy}{dx}=\left( \frac{dx}{dy}\right)^{-1}\).

## Q8 answer#

Velocity is distance travelled per unit of time and therefore differentiating with respect to time produces the velocity at time \(t\), \(\displaystyle \frac{ds}{dt}\equiv v=u+at\).Differentiating again, produces \(d^2s/dt^2 = a\), so that \(a\) must be the acceleration as this is defined as distance/time^{2}.

## Q9 answer#

(a) The first two derivatives with \(t\) are

and so it seems reasonable to conclude that by induction

(b) The related calculation for the distance is

and therefore \(\displaystyle \frac{d^nE}{dx^n}=(-ik)^n E\).

These results indicate that

is a general solution to the sets of differential equations

## Q10 answer#

(a) Starting with the first equation, simplifying, and using \(d\ln(c) = dc/c \) gives

Multiplying both sides by \(dx/dc\) and again using \(d \ln(c) = dc/c\) gives

(b) The differential is

Using SymPy confirms this result.

```
A,B,c,g = symbols(' A B c g') # use g instead of gamma
lngamma = -A*sqrt(c)/(1+B*sqrt(c))
ans = diff(lngamma,c)
simplify(ans*c) # don't forget to multiply by c after differentiating
```

## Q11 answer#

Use equation(15) with \(v(x)\) = 0 and \(u(x)=a/x\) gives

SymPy also can do this calculation

```
a,x = symbols(' a x')
f = integrate( x**2/(exp(-x)-1 ),(x,0,a/x) )
ans = diff(f,x)
ans
```