Simplifing an equation and solve it for x I want to simplify an equation.
I have:
$$ \sqrt{(x+r*sin(\alpha))^2+(m*x+t-r*cos(\alpha))^2}+r=l$$
and also I know:
$$ r=\frac{t+m*x-x*tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)}$$
If I put the equation of $r$ in my other equation I get:
$$ \sqrt{(x+\frac{t+m*x-x*tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)}*sin(\alpha))^2+(m*x+t-\frac{t+m*x-x*tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)}*cos(\alpha))^2}+\frac{t+m*x-x*tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)}=l$$
I now have to solve for x and I don't get a solution for it because it is to complicated. So I tried to simplify the equation with Mathcad and solve it then for x but also this gave me an expression which was too long to display and Mathcad cannot show it to me.
Are there any suggestions how to simplify this equation to get a result for x?
Best regards,
mk3
 A: It is less complicated than it looks. However, the result is still lengthy.
Your equation for $r$ (it is $r$ you want to replace) is linear in $x$:
$r= \frac{t+m*x-x*tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)} = A + B x$,
where $A =  \frac{t}{cos(\alpha)+sin(\alpha)*tan(\delta)} $ and $B = \frac{m-tan(\delta)}{cos(\alpha)+sin(\alpha)*tan(\delta)} $
Replacing $r$, your first equation can then be written
$$(x+(A + B x) \sin(\alpha))^2+(m x+t-(A + B x) \cos(\alpha))^2=(l-r)^2 = (l-A - B x)^2 $$
which can be slightly simplified, making use of $\sin(\alpha)^2+ \cos(\alpha)^2 = 1 $:
$$x^2 (A^2 + m^2 + 1) + A x (2 B - 2 (\cos(α) (m x + t) - x \sin(α))) + B^2 - 2 B (\cos(α) (m x + t) - x \sin(α)) + 2 m t x + t^2 = (l -(Ax + B))^2  $$
so this is a quadratic equation in $x$ which can readily be solved:
$$
x = \frac{-1/2 \sqrt{(2 A l - 2 A t \cos(α) + 2 B \sin(α) - 2 B m \cos(α) + 2 m t)^2 - 4 (2 A \sin(α) - 2 A m \cos(α) + m^2 + 1) (2 B l - 2 B t \cos(α) - l^2 + t^2)} - A l + A t \cos(α) - B \sin(α) + B m \cos(α) - m t}{2 A \sin(α) - 2 A m \cos(α) + m^2 + 1} 
$$
Now put $A$ and $B$ back in. $\qquad \Box$
