(i) To show that \(\frac{d}{d\theta}(\tan^2 \theta) = \frac{2 \tan \theta}{\cos^2 \theta}\), we start by using the chain rule:
\(\frac{d}{d\theta}(\tan^2 \theta) = 2 \tan \theta \cdot \frac{d}{d\theta}(\tan \theta).\)
Since \(\frac{d}{d\theta}(\tan \theta) = \sec^2 \theta = \frac{1}{\cos^2 \theta}\), we have:
\(\frac{d}{d\theta}(\tan^2 \theta) = 2 \tan \theta \cdot \frac{1}{\cos^2 \theta} = \frac{2 \tan \theta}{\cos^2 \theta}.\)
(ii) To solve the differential equation \(x \cos^2 \theta \frac{dx}{d\theta} = 2 \tan \theta + 1\), we separate variables:
\(x \frac{dx}{d\theta} = \frac{2 \tan \theta + 1}{\cos^2 \theta}.\)
Integrating both sides, we have:
\(\int x \, dx = \int \left( \frac{2 \tan \theta}{\cos^2 \theta} + \frac{1}{\cos^2 \theta} \right) d\theta.\)
The left side integrates to \(\frac{1}{2}x^2\).
The right side integrates to \(\tan^2 \theta + \tan \theta\).
Thus, \(\frac{1}{2}x^2 = \tan^2 \theta + \tan \theta + C\).
Using the initial condition \(x = 1\) when \(\theta = \frac{1}{4}\pi\), we find:
\(\frac{1}{2}(1)^2 = \tan^2 \left(\frac{1}{4}\pi\right) + \tan \left(\frac{1}{4}\pi\right) + C.\)
\(\frac{1}{2} = 1 + 1 + C \Rightarrow C = -\frac{3}{2}.\)
Thus, \(\frac{1}{2}x^2 = \tan^2 \theta + \tan \theta - \frac{3}{2}\).
Substituting \(\theta = \frac{1}{3}\pi\), we find:
\(\frac{1}{2}x^2 = \tan^2 \left(\frac{1}{3}\pi\right) + \tan \left(\frac{1}{3}\pi\right) - \frac{3}{2}.\)
\(\frac{1}{2}x^2 = \left(\sqrt{3}\right)^2 + \sqrt{3} - \frac{3}{2} = 3 + \sqrt{3} - \frac{3}{2}.\)
\(\frac{1}{2}x^2 = \frac{3}{2} + \sqrt{3}.\)
\(x^2 = 3 + 2\sqrt{3}.\)
\(x = \sqrt{3 + 2\sqrt{3}} \approx 2.54.\)