Determine the constants a and b given that y = a sin 3x +
Determine the constants $a$ and $b$ given that $y = a\sin 3x + b\cos 3x$ and $y' = a\sin 3x + (b+6)\cos 3x$.
Explanation of Method
A small linear system produced by comparing two forms of one derivative.
Step 1: Differentiate the given expression
From $y = a\sin 3x + b\cos 3x$, the chain rule supplies a factor $3$ in each term: \[y' = 3a\cos 3x - 3b\sin 3x. \tag{1}\]
Step 2: Equate with the prescribed form
\[ 3a\cos 3x - 3b\sin 3x = a\sin 3x + (b+6)\cos 3x. \]
Since $\sin 3x$ and $\cos 3x$ are linearly independent, their coefficients must agree separately: $\sin 3x:\quad -3b = a, \qquad\qquad \cos 3x:\quad 3a = b+6$.
Step 3: Solve the system
Substituting $a = -3b$ into the second equation: \[3(-3b) = b+6 \;\Longrightarrow\; -9b = b+6 \;\Longrightarrow\; -10b = 6 \;\Longrightarrow\; b = -\frac{3}{5},\]
\[ a = -3b = -3\left(-\frac35\right) = \frac{9}{5}. \]
Step 4: Verification
With these values $y = \tfrac95\sin 3x - \tfrac35\cos 3x$, so differentiating gives
\[y' = 3\cdot\tfrac95\cos 3x - 3\cdot\left(-\tfrac35\right)\sin 3x = \tfrac{27}{5}\cos 3x + \tfrac95\sin 3x\]
\[\text{Prescribed form:}\quad \tfrac95\sin 3x + \left(-\tfrac35+6\right)\cos 3x = \tfrac95\sin 3x + \tfrac{27}{5}\cos 3x \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,a = \dfrac{9}{5}, \qquad b = -\dfrac{3}{5}\,}\]
Remark
Remark. Writing $y = A\sin(3x+\varphi)$ with $A = \sqrt{a^{2}+b^{2}} = \tfrac{3\sqrt{10}}{5}$ shows the solution is a single sinusoid. The problem is really the statement that the differentiation operator acts on the two-dimensional space spanned by $\sin 3x$ and $\cos 3x$ as a rotation by $\tfrac{\pi}{2}$ scaled by $3$.