# Jacobian of a planar manipulator with 4 links

I have a mobile manipulator that moves on the plane. The base moves in SE(2) and the manipulator is also planar with 4 links. The mobile base will be a differential drive robot and its motion is defined as:

The manipulator is attached to the center of our mobile base. How do I compute the Jacobian of the mobile manipulator?

I know that for the mobile manipulator I have something of the form:

The middle matrix is what I need to compute.

$$J = \begin{bmatrix} -a_1 s_1 - a_2 s_{12} - a_3 s_{123} - a_4 s_{1234} & -a_2 s_{12} - a_3 s_{123} - a_4 s_{1234} & - a_3 s_{123} - a_4 s_{1234} & - a_4 s_{1234} \\ a_1 c_1 + a_2 c_{12} + a_3 c_{123} + a_4 c_{1234} & a_2 c_{12} + a_3 c_{123} + a_4 c_{1234} & a_3 c_{123} + a_4 c_{1234} & a_4 c_{1234}\\ 0 & 0 & 0 & 0 \end{bmatrix}$$
Where: $$a_1$$ is the link 1 length, $$a_2$$ is the link 2 length, etc. $$s_1$$ is $$\sin(\theta_1)$$, $$c_{12}$$ is $$\cos(\theta_1 + \theta_2)$$ etc.