Step 1: Choose the substitution:
The integrand has \(\cos^3x\) and \(\sin 2x\). Put \(t = \tan x\), so \(dx = \frac{dt}{1+t^2}\). Also \(\sin 2x = \frac{2t}{1+t^2}\) and \(\frac{1}{\cos^3x} = \sec^3x = (1+t^2)^{3/2}\).
Step 2: Simplify the integrand:
\[ \int \frac{(1+t^2)^{3/2}\sqrt{1+t^2}}{\sqrt{2t}\,(1+t^2)}\,dt = \int \frac{(1+t^2)^2}{(1+t^2)\sqrt{2t}}\,dt = \frac{1}{\sqrt{2}}\int \left(t^{-1/2} + t^{3/2}\right)dt \]
Step 3: Integrate:
\[ \frac{1}{\sqrt{2}}\left(2t^{1/2} + \frac{2}{5}t^{5/2}\right) + c = \frac{\sqrt{2}}{5}\,\sqrt{t}\,(5 + t^2) + c \]
Taking out the common factor \(\frac{\sqrt{2}}{5}\sqrt{t}\) leaves \(5 + t^2\). This works because \(\frac{2}{\sqrt{2}} = \sqrt{2} = \frac{\sqrt{2}}{5}\cdot 5\) and \(\frac{2}{5\sqrt{2}} = \frac{\sqrt{2}}{5}\).
Step 4: Compare with the given form:
Replace \(t = \tan x\): the result is \(\frac{\sqrt{2}}{5}(\tan^2x + 5)\sqrt{\tan x} + c\). Comparing with \(p(\tan^2x + q)\sqrt{\tan x} + c\) gives \(p = \frac{\sqrt{2}}{5}\) and \(q = 5\).
Step 5: Why the other options are wrong:
The ratio of the coefficients of \(t^{1/2}\) and \(t^{5/2}\) is \(\frac{2}{2/5} = 5\), so \(q\) must be \(5\), not \(\frac{1}{5}\) or \(3\). Option (A) has the right \(p\) but \(q = \frac{1}{5}\) is upside down. Options (B) and (D) have the wrong \(p\) as well, since the coefficient of \(t^{5/2}\) is \(\frac{\sqrt{2}}{5}\).
Final Answer:
We get \(p = \frac{\sqrt{2}}{5}\) and \(q = 5\), which is option (C).
\[ \boxed{p = \frac{\sqrt{2}}{5},\ q = 5} \]