If $9\sin\theta+40\cos\theta=41$ then prove that $41\cos\theta=40$. I tried it this way:     
$$ 40\cosθ+9\sinθ=41 $$ 
$$ 9\sinθ=41-40\cos\theta   $$   
Squaring both the sides:   
$$81\sin^2\theta=1681+1600\cos^2\theta-2\cdot 40\cdot 41 \cos\theta$$ 
$$81-81 \cos^2\theta=  1681+1600\cos^2\theta-3280 \cos\theta$$
$$1681\cos^2\theta-3280\cos\theta+1600=0$$   
Solving the quadratic equation gives  $\cos\theta=\dfrac{40}{41}$. It is not easy to solve the quadratic equation without calculator so there must be some other method, if yes then please explain.   
P.S: I've found the other method so I am self-answering the question.

I noted that $9,40$ and $41$ are pythagorean triple, i.e $9^2+40^2=41^2$. This fact can be used to solve the question easily. I'll show the solution for the general case:
$a\cos\theta+b\sin\theta=c,$ given that $a^2+b^2=c^2$     
$$a\cos\theta+b\sin\theta=c$$
$$b\sin\theta=c-a\cos\theta$$
Squaring both the sides:
$$b^2\sin^2\theta=c^2+a^2\cos^2\theta-2ca\cos\theta$$
Substituting $c^2$ with $a^2+b^2$ gives:
$$b^2\sin^2\theta=a^2+b^2+a^2\cos^2\theta-2ca\cos\theta$$
$$a^2+b^2\cos^2\theta+a^2\cos^2\theta-2ca\cos\theta=0$$
$$a^2+(a^2+b^2)\cos^2\theta-2ca\cos\theta=0$$
$$a^2+(c\cos\theta)^2-2a(c\cos\theta)=0$$
$$(a-c\cos\theta)^2=0$$
$$\cos\theta=\dfrac{a}{c}$$   
Substituting $c=41$ and $a=40$ will give the solution of the particular equation discussed in the question.
An interesting thing is that $\sin\theta=\sqrt{1-\dfrac{a^2}{c^2}}=\dfrac{b}{c}, $ , i.e the equation actually belongs to a right angled triangle having $a$ as its base, $b$ as its prependicular and $c$ as its hypotenuse. 
There is another method in which we divide both sides of the equation with $\sqrt{a^2+b^2}$ and then use the identity: 
$\sin (A+B)=\sin A \cos B+\cos A \cos B$   
This method will give the same results.
Converse
Consider a right angled triangle having base $a$, perpendicular $b$ and hypotenuse $c$. We have:
$$\cos\theta=\dfrac{a}{c}\ \  \text{and}\ \ \  \sin\theta=\dfrac{b}{c}$$
$$\implies a=c\cos\theta \ \ \ \text{and}\ \ \  b=c\sin\theta$$
By the pythagoras theorem:
$$a^2+b^2=c^2 $$
$$\implies\ c^2\cos^2\theta+c^2\sin^2\theta=c^2$$
$$\implies c\cos\theta \cdot c\cos\theta + c\sin\theta \cdot c\sin\theta=c^2$$
$$\implies a\cos\theta+b\sin\theta=c$$
