If
![f(x) = e^(ax)\cos(bx)](https://img.qammunity.org/2022/formulas/mathematics/high-school/la2sq0vcn1od4scxy2c2xur3bgrrm4hhji.png)
then by the product rule,
![f'(x) = \left(e^(ax)\right)' \cos(bx) + e^(ax)\left(\cos(bx)\right)'](https://img.qammunity.org/2022/formulas/mathematics/high-school/wol1z0m4o2jp2qht4x1rpvxopf77aep0el.png)
and by the chain rule,
![f'(x) = e^(ax)(ax)'\cos(bx) - e^(ax)\sin(bx)(bx)'](https://img.qammunity.org/2022/formulas/mathematics/high-school/za168hdfnyagawn7efajimmhjvt4gr8qx7.png)
which leaves us with
![f'(x) = \boxed{ae^(ax)\cos(bx) - be^(ax)\sin(bx)}](https://img.qammunity.org/2022/formulas/mathematics/high-school/dqsi18lmqo5j5rtyogkcw4e46ljtcaf9ih.png)
Alternatively, if you exclusively want to use the chain rule, you can carry out logarithmic differentiation:
![\ln(f(x)) = \ln(e^(ax)\cos(bx)} = \ln(e^(ax))+\ln(\cos(bx)) = ax + \ln(\cos(bx))](https://img.qammunity.org/2022/formulas/mathematics/high-school/ljlk4ti03nvo2s3nj5lw1jv3wvzkjbsnn7.png)
By the chain rule, differentiating both sides with respect to x gives
![(f'(x))/(f(x)) = a + ((\cos(bx))')/(\cos(bx)) \\\\ (f'(x))/(f(x)) = a - (\sin(bx)(bx)')/(\cos(bx)) \\\\ (f'(x))/(f(x)) = a-b\tan(bx)](https://img.qammunity.org/2022/formulas/mathematics/high-school/q6fg4blpex2ri2kbg48u13w2htiqk8t4v8.png)
Solve for f'(x) yields
![f'(x) = e^(ax)\cos(bx) \left(a-b\tan(bx)\right) \\\\ f'(x) = e^(ax)\left(a\cos(bx)-b\sin(bx))](https://img.qammunity.org/2022/formulas/mathematics/high-school/icj8fyfip439pfzfhi2a93fal73wt5zeu8.png)
just as before.