$\cos x = kx$, finding $k$ that gives two solutions $\cos x = 0.3x$ has three solutions. $\cos x = 0.4x$ has one solution. How to find $k$ so that $\cos x = kx$ has two solutions?

By symmetry we can assume $a>0$.
By IVT there is a solution between $0$ and $\frac{\pi}{2}$. You want a second solution $x_0$.
This means that $ax$ will be tangent to $\cos(x)$ at $x_0$, otherwise you can prove there is another solution.
Thus $\cos(x_0)=ax_0$ and $-\sin(x_0)=a$. Hence $a^2(x_0^2+1)=1$. Which means that 
$$x_0$ must be the solution to
$$\cos(x_0)= \frac{x_0}{\sqrt{x_0^2+1}}$$, between $\frac{3\pi}{2}$ and $2\pi$.
Then $a=\frac{1}{\sqrt{x_0^2+1}}$.
Geometrically, this is the point so that $ax$ is tangent to the second "mountain" of $\cos(x)$.
The equation unfortunately seems to be impossible to solve exactly, but you can approximate the solution. 
$%edits must have at least 6 characters, blah blah blah...$
