I'm trying to solve a control problem involving a pendulum, in which the equation of motion is:
$ml^2\frac{d^2 \theta}{d\theta^2} = \tau -mgl cos(\theta)$
I need to linearize $\tau -mgl cos(\theta)$ for $\tau = \tau_0 + \delta \tau, \theta = \theta_0 + \delta \theta$.
The answer to this question is supposed to be $mgl sin(\theta_0)\delta \theta + \delta \tau$, but I just don't see how to get to that answer. I know it probably assumes that $\delta \tau = -mglcos(\theta_0)$, as it is the minimal torque required ot counteract the force of gravity. But the other part, probably some mathematical trick involving the $\delta \theta$, eludes me.
I think you forgot to mention that $(\tau_0, \theta_0)$ is a fixed point, i.e. $\tau_0 - mgl \cos(\theta_0) = 0$. Now, we can use Taylor series expansion around $(\tau_0, \theta_0)$ to obtain
$$ml^2 \frac{d^2 (\theta_0 + \delta \theta)}{dt^2} = \tau_0 + \delta \tau - mgl [\cos(\theta_0) - \sin(\theta_0) \delta \theta + O((\delta \theta) ^2)]$$
Ignoring the higher order terms for small $\delta \theta$, we can obtain
$$ml^2 \frac{d^2 (\delta \theta)}{dt^2} = \delta \tau + mgl \sin(\theta_0) \delta \theta$$