Eliminate[{a==  (Sqrt[(((xr -x))^2)+(y^2)])+(Sqrt[(x^2)+(y^2)]),b== (Sqrt[(((xl - x ))^2)+(y^2)])+(Sqrt[(x^2)+(y^2)])},x]

Solve[(b^4) ((a^2)-(xr^2))+a (b^3) (-2 (a^2)+2 (xr^2))+a b xl (2 (a^2) xl-2 xl (xr^2)-8 xr (y^2))+(b^2) ((a^4)-2 (a^2) (xl^2)+2 (a^2) xl xr-2 (a^2) (xr^2)+2 (xl^2) (xr^2)-2 xl (xr^3)+(xr^4)+4 (xr^2) (y^2))==(xl^2) ((a^4)-(a^2) (xl^2)+2 (a^2) xl xr-2 (a^2) (xr^2)+(xl^2) (xr^2)-2 xl (xr^3)+(xr^4)-4 (a^2) (y^2)),y]

FullSimplify[{{y->-(1/(2 (Sqrt[(a^2) (xl^2)-2 a b xl xr+(b^2) (xr^2)])))(√(-(a^4) (b^2)+2 (a^3) (b^3)-(a^2) (b^4)+(a^4) (xl^2)-2 (a^3) b (xl^2)+2 (a^2) (b^2) (xl^2)-(a^2) (xl^4)-2 (a^2) (b^2) xl xr+2 (a^2) (xl^3) xr+2 (a^2) (b^2) (xr^2)-2 a (b^3) (xr^2)+(b^4) (xr^2)-2 (a^2) (xl^2) (xr^2)+2 a b (xl^2) (xr^2)-2 (b^2) (xl^2) (xr^2)+(xl^4) (xr^2)+2 (b^2) xl (xr^3)-2 (xl^3) (xr^3)-(b^2) (xr^4)+(xl^2) (xr^4)))},{y->(1/(2 (Sqrt[(a^2) (xl^2)-2 a b xl xr+(b^2) (xr^2)])))(√(-(a^4) (b^2)+2 (a^3) (b^3)-(a^2) (b^4)+(a^4) (xl^2)-2 (a^3) b (xl^2)+2 (a^2) (b^2) (xl^2)-(a^2) (xl^4)-2 (a^2) (b^2) xl xr+2 (a^2) (xl^3) xr+2 (a^2) (b^2) (xr^2)-2 a (b^3) (xr^2)+(b^4) (xr^2)-2 (a^2) (xl^2) (xr^2)+2 a b (xl^2) (xr^2)-2 (b^2) (xl^2) (xr^2)+(xl^4) (xr^2)+2 (b^2) xl (xr^3)-2 (xl^3) (xr^3)-(b^2) (xr^4)+(xl^2) (xr^4)))}}]

Eliminate[{a==  (Sqrt[(((xr -x))^2)+(y^2)])+(Sqrt[(x^2)+(y^2)]),b== (Sqrt[(((xl - x ))^2)+(y^2)])+(Sqrt[(x^2)+(y^2)])},y]

Solve[a (b^2)+b (-(a^2)-2 x xr+(xr^2))==a xl (-2 x+xl),x]

FullSimplify[{{x->(((a^2) b-a (b^2)+a (xl^2)-b (xr^2))/(2 (a xl-b xr)))}}]

Vysledne vztahy pro výbočet bodu odrazu ve tvaru použitém v programu
f,g - jsou dráhy změřené sonarem.

y==(Sqrt[(((-(g^2)+(xl^2)) (f-xr) (f-g+xl-xr) (f+xr) (f-g-xl+xr))/(4(((f xl-g xr))^2)))]) , x==((f((f-g) g+(xl^2))-b (xr^2))/(2 f xl-2 g xr))

Vyjadreni vztahu pro kontrolovanou  trojúhelníkovou nerovnost.

Eliminate[{c==(Sqrt[(x^2)+(y^2)]),a==(Sqrt[(((x-xl))^2)+(y^2)]), b==(Sqrt[(((xr-x))^2)+(y^2)]), a+c==f, b+c==g}, {x,y, a,b}]

Solve[xl (-2 c g+(g^2)+xl xr-(xr^2))==-2 c f xr+(f^2) xr,c]

FullSimplify[(((g^2) xl-(f^2) xr+(xl^2) xr-xl (xr^2))/(2 (g xl-f xr)))==c]

Eliminate[{c==(Sqrt[(x^2)+(y^2)]),a==(Sqrt[(((x-xl))^2)+(y^2)]), b==(Sqrt[(((xr-x))^2)+(y^2)]), a+c==f, b+c==g}, {x,y, a,c}]

Solve[xl (2 b g-(g^2)+xl xr-(xr^2))==(f^2) xr+f (2 b-2 g) xr,b]

{{b->(((g^2) xl+(f^2) xr-2 f g xr-(xl^2) xr+xl (xr^2))/(2 (g xl-f xr)))}}
FullSimplify[b==(((g^2) xl+(f^2) xr-2 f g xr-(xl^2) xr+xl (xr^2))/(2 (g xl-f xr)))]

Eliminate[{c==(Sqrt[(x^2)+(y^2)]),a==(Sqrt[(((x-xl))^2)+(y^2)]), b==(Sqrt[(((xr-x))^2)+(y^2)]), a+c==f, b+c==g}, {x,y, b,c}]

Solve[(f^2) xr+f (-2 g xl-2 a xr)==xl (-2 a g-(g^2)-xl xr+(xr^2)),a]

FullSimplify[{{a->((2 f g xl-(g^2) xl-(f^2) xr-(xl^2) xr+xl (xr^2))/(2 (g xl-f xr)))}}]

Vysledne strany trojuhelniků nutné pro zjistění existence výsledného bodu.

a==((-2 f g xl+(f^2) xr+xl ((g^2)+(xl-xr) xr))/(-2 g xl+2 f xr)), b==(((g^2) xl-2 f g xr+xr ((f^2)+xl (-xl+xr)))/(2 g xl-2 f xr)),c==((-(g^2) xl+xr ((f^2)+xl (-xl+xr)))/(-2 g xl+2 f xr))