How to resolve velocity components? In the arrangement shown in the figure, the ends P and Q of an inextensible string move downwards with uniform speed $u$, pulleys A and B are fixed. With what speed does the mass M move upwards?

My attempt: I resolved the component of $u$ along the $y-$axis. That is $u\cos\theta+u\cos\theta=2u\cos\theta$. But the answer is $\frac{u}{\cos\theta}$.
My questions
why can’t I simply resolve vector into components and solve ?
I’m unable to determine my mistake. What am I missing here?
 A: The underlying reason as to why you think that the speed of the mass $M$ should be $2u\cos\theta$ is because you seem to think that the velocity of the mass $M$ should be the vector-summation of the velocities of the string attached to block $A$ and the string attached to block $B$--(you think) after all, these strings are the cause behind the motion of the mass $M$ and thus, their "influence" must be added in order to obtain the behavior of mass $M$. But, of course, this line of thinking must be wrong because it lands one to a wrong prediction. 
The simple reason as to why this argument is wrong is because it isn't based on any law of physics but is simply based on an "intuition" that one develops via vectorially adding forces that act on the same object in order to ascertain their combined influence. Well, velocities aren't forces and there is no such vectorial addition law to directly ascertain the "combined influence" of velocities of strings that are attached to a given object. In Newtonian mechanics, the influence of a mechanism on another is represented via forces--not velocities. So, the net tension on the mass $M$ will be the vector summation of the tensions in the strings attached to it--but the analogous sentence doesn't remain true for velocities of the strings. 
So, how does one determine the velocity of the mass $M$? Well, that is actually pretty simple and straightforward--I will (not) come to that later. Performing an "exorcism" of confusing ideas with which one surrounds themselves when confronted with this kind of a problem is more tricky--which I have already done in the previous paragraphs (I hope so!). First of all, the only reason one can expect to find the velocity of a given object in a situation based on the information about the velocities of a bunch of other objects is that the system is constrained, i.e., there are certain definite ways in which the velocities of different parts of the system are correlated. The particular correlation depends on the particular constraint which is simply to be taken as a part of the definition of the problem. This is an important point--the fact that you can determine the velocity of the mass $M$ based on the information about the velocities of the masses $A$ and $B$ is entirely dependent on how the problem has been formulated and not on any canonical laws of physics such as the Newtonian law of evolution. Anyway, the constraint that makes the velocity of the mass $M$ predictable is the constraint of the inextensible nature of the strings. Exploiting this constraint to evaluate the velocity of the mass $M$ is a simple geometry puzzle and has been beautifully explained by @Charlie in their answer to your question.    
A: If L is the distance between A and B, the distance between A and M at time t is $\frac{L}{2}\csc{\theta(t)}$ and the distance D(t) between M and the top is $$D(t)=\frac{L}{2}\cot{\theta(t)}$$.  At time $t+\Delta t$, the distance between A and M is $\frac{L}{2}\csc{\theta}-u\Delta t$, and $$\sin{\theta(t+\Delta t)}=\frac{L/2}{\frac{L}{2}\csc{\theta(t)}-u\Delta t}=\frac{L/2}{\frac{L}{2}-u\Delta t\sin{\theta(t)}}sin{\theta(t)}$$So, $$\sin{\theta(t+\Delta t)}-\sin{\theta(t)}=\frac{L/2}{\frac{L}{2}-u\Delta t\sin{\theta(t)}}sin{\theta(t)}-sin{\theta(t)}=\frac{u\Delta t \sin^2{\theta(t)}}{\frac{L}{2}-u\Delta t\sin{\theta(t)}}$$If we divide both sides of this equation by $\Delta t$ and take the limit as $\Delta t$ approaches zero, we obtain:$$\cos{\theta(t)}\frac{d\theta}{dt}=\frac{2}{L}u\sin^2{\theta(t)}$$ or $$\frac{d\theta}{dt}=\frac{2}{L}u\sin{\theta(t)}\tan{\theta(t)}$$
and, similarly, the the rate of change of the distance between M and the top is $$\frac{dD}{dt}=-\frac{L}{2}\csc^2{\theta(t)}\frac{d\theta}{dt}$$
Combining the previous two equations, we obtain finally, $$V=-\frac{dD}{dt}=\frac{u}{\cos{\theta(t)}}$$
A: Let the length of rope from pulley $A$ to pulley $B$ be $2l(t)$. By symmetry, the length of rope from either pulley to the point where $M$ is suspended is $l(t)$. Let the distance between $M$ and the ceiling be $h(t)$ and the distance between the two pulleys be $2k$. We wish to find $\frac{dh(t)}{dt}$.
We know that
$[l(t)]^2 = [h(t)]^2 + k^2 \\$
Now we can differentiate both sides with respect to time:
$2l(t) \frac{dl(t)}{dt} = 2h(t) \frac {dh(t)}{dt} \\
\Rightarrow \frac{dh(t)}{dt}=\frac{l(t)}{h(t)}\frac{dl(t)}{dt}$
but $\frac{dl(t)}{dt}=-u$ and $\frac{h(t)}{l(t)} = \cos \theta (t)$ so
$\frac{dh(t)}{dt}=-\frac{u}{\cos \theta (t)}$
Note: If $\theta$ were constant then we could differentiate $h(t)=l(t) \cos \theta$ and conclude that $\frac{dh(t)}{dt}= \frac{dl(t)}{dt}\cos \theta = -u\cos\theta$. However this is incorrect because $\theta$ is not constant. Instead we have
$\frac{dh(t)}{dt}= \frac{d}{dt}\left(l(t)\cos \theta(t)\right) = -u \cos \theta(t) - l(t) \sin \theta(t) \frac{d \theta(t)}{dt}$
A: In general these kinds of problems with pulleys are solved in the same way, so I'll provide an explanation so it's useful for others.
First, note that the length of the string is constant, and denote it by $L$. Now, let's divide it in four segments:
$$L=L_A+L_{m,left}+L_{m,right}+L_B=constant$$
From the geometry of the figure, you may want to express the other lengths in function of known quantities.
Now if we take the derivative of the above expression,
$$v_A+v_{m,left}+v_{m,right}+v_B=0$$
Since you're interested in the upwards velocity, from the geometry of the problem you can clearly see that,
$$v_y=v_{m,left}\cos\theta=v_{m,right}\cos\theta$$
Substituting,
$$v_A+2v_y\cos\theta+v_B=0$$
Since the problem says the segments $A$ and $B$ are moving downwards, then $v_A=v_B=-u$, so we finally get:
$$v_y=u\cos\theta$$
You were on the right track, however I think you got confused with the trigonometric identities, hence why you got the cosine on the wrong position.
