Is there any way to solve this type of equation exactly for x, where a-h are precalculated constants:
$a\cos(g x)+b \sin(g x)+c\cos(h x)+d\sin(hx)+ex+f=0$
Or is my only/best option some sort of approximate or iterative solution?
Update: As it seems the above equation cannot be solved exactly but here's a description what I'm trying to achieve in terms of geometric problem, in hopes somebody knows a better approach (with solvable equation) for solving that underlying problem.
Basically I have two spheres of different sizes and angular velocities, moving towards each other alongside the x-axis (linear motion can be simplified to only one moving). Both spheres contain some specific point on their surface and what I'm trying to solve is the (first) time that those points hit some common point in regard to that x-axis. That is they both hit the green line in the picture below in regard to x-axis, even though they might be at different y positions within the line. So the x variable that I'm trying to solve can be thought of either as the time of impact or the location of that green line.
As a further complication, these are actually 3D-spheres so that the axis of rotation can be anything (combined rotations around two axes) and different between the spheres. The linear motion is alongside a single axis though.
But that in essence is what I tried to model with that trigonometric equation. That e*x term models the relative linear motion and there are sin/cos terms for both spheres for getting the change alongside the x-axis for the 3D-rotation.
Any ideas if there could be some other approach in solving that?