MATLAB: I need a final equation… second….

solve

First of all..
Walter Roberson very thanks… And I'm really sorry coz i made a mistake.. one fuction… one more please…
and one more explain…
->
I used this solve equation.
[x,z]=solve('a=(1/1460)*(sqrt((x-d)^2+(z-g)^2)-sqrt((x-c)^2+(z-f)^2))', 'b=(1/1460)*(sqrt((x-e)^2+(z-h)^2)-sqrt((x-c)^2+(z-f)^2))')
espeacially Solve equation.
But…. The problem is… 'Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display.'
a to h function are 'Random variable', so I need final equation….
How to get the final equation?

Best Answer

I'm not sure what is meant by "a to ha function are 'Random variable', so I will just phrase the answer as if they are arbitrary constants.
The first key to this is to tell solve() that x and z are to be solved for by adding parameters 'x','z' to the end of the calling sequence.
The solution from solve() might be expressed in terms of some RootOf() of a quadratic equations. I do not recall at the moment how to ask MuPad to expand those equations; in Maple the call to use is allvalues().
Then simplify() -- or in the case of Maple, simplify(%,size), which asks it do look for factorizations and so on.
The output is as follows, again two solutions.
{
x = (1/4263200)*(((1460*h-1460*f)*a+1460*b*(f-g))*(-9685390482496000000*(b^2-(1/2131600)*c^2+(1/1065800)*e*c-(1/2131600)*e^2-(1/2131600)*(f-h)^2)*(a^2-2*a*b+b^2-(1/2131600)*d^2+(1/1065800)*d*e-(1/2131600)*e^2-(1/2131600)*(g-h)^2)*((c-e)*a-(-d+c)*b)^2*(a^2-(1/2131600)*c^2+(1/1065800)*c*d-(1/2131600)*d^2-(1/2131600)*(f-g)^2))^(1/2)-4543718560000*(-(1/2131600)*((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^3+((1/2131600)*e*a^2-(1/2131600)*b*(d+e)*a+(1/2131600)*b^2*d-(1/4543718560000)*(g-h)*((-e+d)*f+e*g-d*h))*c^2+(a^3*b+(-2*b^2-(1/2131600)*f^2+((1/2131600)*g+(1/2131600)*h)*f-(1/2131600)*g*h+(1/2131600)*e^2)*a^2+(b^2+(1/1065800)*f^2+(-(1/1065800)*g-(1/1065800)*h)*f+(1/532900)*g*h-(1/2131600)*h^2-(1/2131600)*d^2-(1/2131600)*e^2-(1/2131600)*g^2)*b*a+(-(1/2131600)*f^2+((1/2131600)*g+(1/2131600)*h)*f+(1/2131600)*d^2-(1/2131600)*g*h)*b^2-(1/4543718560000)*(g-h)*((h-g)*f^2+(g^2-h^2+d^2-e^2)*f-d^2*h+(e^2-h*(g-h))*g))*c-a^3*b*e+((d+e)*b^2-(1/2131600)*d*f^2+((1/1065800)*d*h-(1/2131600)*e*(g-h))*f-(1/2131600)*d*h^2-(1/2131600)*(e^2-h*(g-h))*e)*a^2-(b^2*d+(-(1/2131600)*d-(1/2131600)*e)*f^2+((1/1065800)*d*h+(1/1065800)*e*g)*f-(1/2131600)*d^2*e+(-(1/2131600)*h^2-(1/2131600)*e^2)*d-(1/2131600)*e*g^2)*b*a+(-(1/2131600)*e*f^2+(((1/2131600)*g-(1/2131600)*h)*d+(1/1065800)*e*g)*f-(1/2131600)*d^3-(1/2131600)*g*(g-h)*d-(1/2131600)*e*g^2)*b^2+(1/4543718560000)*((h-g)*f^2+(g^2-h^2+d^2-e^2)*f-d^2*h+(e^2-h*(g-h))*g)*((-e+d)*f+e*g-d*h))*((a-b)*c-a*e+d*b))/(((a-b)*c-a*e+d*b)*(((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^2+(-2*e*a^2+2*b*(d+e)*a-2*b^2*d+(1/1065800)*(g-h)*((-e+d)*f+e*g-d*h))*c+(h^2+e^2+f^2-2*f*h)*a^2-2*b*(f^2+(-g-h)*f+d*e+g*h)*a+(f^2+d^2-2*f*g+g^2)*b^2-(1/2131600)*((-e+d)*f+e*g-d*h)^2))
z = (1460*(-9685390482496000000*(b^2-(1/2131600)*c^2+(1/1065800)*e*c-(1/2131600)*e^2-(1/2131600)*(f-h)^2)*(a^2-2*a*b+b^2-(1/2131600)*d^2+(1/1065800)*d*e-(1/2131600)*e^2-(1/2131600)*(g-h)^2)*((c-e)*a-(-d+c)*b)^2*(a^2-(1/2131600)*c^2+(1/1065800)*c*d-(1/2131600)*d^2-(1/2131600)*(f-g)^2))^(1/2)+((g-h)*d+(h-g)*e)*c^3+((2131600*b^2-4263200*a*b-e^2+2131600*a^2-d^2+2*d*e)*f+(-g+2*h)*d^2+(-g-h)*e*d+(2*g-h)*e^2-g^3+h*g^2+(-2131600*a*b+2131600*a^2+h^2)*g-h^3+(2131600*b^2-2131600*a*b)*h)*c^2+(((g-h)*d+(h-g)*e)*f^2+(d^3-d^2*e+(4263200*a*b-e^2-2131600*a^2-2131600*b^2+g^2-h^2)*d+e^3+(4263200*a*b-2131600*a^2+h^2-g^2-2131600*b^2)*e)*f-h*d^3+(2*g-h)*e*d^2+((-g+2*h)*e^2-h*g^2+(-h^2-2131600*b^2)*g+2*h^3+(-4263200*b^2+4263200*a*b+2131600*a^2)*h)*d-e^3*g+(2*g^3-h*g^2+(4263200*a*b+2131600*b^2-h^2-4263200*a^2)*g-2131600*h*a^2)*e)*c+(2131600*b^2-4263200*a*b-e^2+2131600*a^2-d^2+2*d*e)*f^3+(d^2*h+(-g-h)*e*d+e^2*g+(2131600*a*b-2131600*b^2)*g+(2131600*a*b-2131600*a^2)*h)*f^2+(-e*d^3+(2*e^2+2131600*a*b+h^2)*d^2+(-e^3+(-8526400*a*b+2131600*b^2-g^2-h^2+2131600*a^2)*e)*d+(g^2+2131600*a*b)*e^2+(2131600*a*b-2131600*b^2)*g^2+(2131600*a*b-2131600*a^2)*h^2+9087437120000*b^2*a^2-4543718560000*b^3*a-4543718560000*a^3*b)*f+e*h*d^3+((-g-h)*e^2+2131600*b^2*g-h^3+(2131600*b^2-2131600*a*b)*h)*d^2+(e^3*g+(h*g^2+(h^2-2131600*b^2)*g-2131600*h*a^2)*e)*d+(-g^3+(-2131600*a*b+2131600*a^2)*g+2131600*h*a^2)*e^2+2131600*b^2*g^3-2131600*b*g^2*a*h+(-2131600*b*a*h^2+4543718560000*b^3*a-4543718560000*b^2*a^2)*g+2131600*a^2*h^3+(4543718560000*a^3*b-4543718560000*b^2*a^2)*h)/(4263200*((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^2+(4*(g-h)*(-e+d)*f+(-4*g*h+4*h^2+8526400*b*(a-b))*d-8526400*e*(-(1/2131600)*g^2+(1/2131600)*g*h+a*(a-b)))*c+4263200*((1/1460)*d+a-b-(1/1460)*e)*(-(1/1460)*d+a-b+(1/1460)*e)*f^2+(4*d^2*h-4*(g+h)*e*d+4*e^2*g-8526400*(a-b)*(a*h-g*b))*f+(4263200*b^2-2*h^2)*d^2+(-8526400*a*b+4*g*h)*e*d+(4263200*a^2-2*g^2)*e^2+4263200*(a*h-g*b)^2)
}
and
{
x = (1/4263200)*(((-1460*h+1460*f)*a-1460*b*(f-g))*(-9685390482496000000*(b^2-(1/2131600)*c^2+(1/1065800)*e*c-(1/2131600)*e^2-(1/2131600)*(f-h)^2)*(a^2-2*a*b+b^2-(1/2131600)*d^2+(1/1065800)*d*e-(1/2131600)*e^2-(1/2131600)*(g-h)^2)*((c-e)*a-(-d+c)*b)^2*(a^2-(1/2131600)*c^2+(1/1065800)*c*d-(1/2131600)*d^2-(1/2131600)*(f-g)^2))^(1/2)-4543718560000*(-(1/2131600)*((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^3+((1/2131600)*e*a^2-(1/2131600)*b*(d+e)*a+(1/2131600)*b^2*d-(1/4543718560000)*(g-h)*((-e+d)*f+e*g-d*h))*c^2+(a^3*b+(-2*b^2-(1/2131600)*f^2+((1/2131600)*g+(1/2131600)*h)*f-(1/2131600)*g*h+(1/2131600)*e^2)*a^2+(b^2+(1/1065800)*f^2+(-(1/1065800)*g-(1/1065800)*h)*f+(1/532900)*g*h-(1/2131600)*h^2-(1/2131600)*d^2-(1/2131600)*e^2-(1/2131600)*g^2)*b*a+(-(1/2131600)*f^2+((1/2131600)*g+(1/2131600)*h)*f+(1/2131600)*d^2-(1/2131600)*g*h)*b^2-(1/4543718560000)*(g-h)*((h-g)*f^2+(g^2-h^2+d^2-e^2)*f-d^2*h+(e^2-h*(g-h))*g))*c-a^3*b*e+((d+e)*b^2-(1/2131600)*d*f^2+((1/1065800)*d*h-(1/2131600)*e*(g-h))*f-(1/2131600)*d*h^2-(1/2131600)*(e^2-h*(g-h))*e)*a^2-(b^2*d+(-(1/2131600)*d-(1/2131600)*e)*f^2+((1/1065800)*d*h+(1/1065800)*e*g)*f-(1/2131600)*d^2*e+(-(1/2131600)*h^2-(1/2131600)*e^2)*d-(1/2131600)*e*g^2)*b*a+(-(1/2131600)*e*f^2+(((1/2131600)*g-(1/2131600)*h)*d+(1/1065800)*e*g)*f-(1/2131600)*d^3-(1/2131600)*g*(g-h)*d-(1/2131600)*e*g^2)*b^2+(1/4543718560000)*((h-g)*f^2+(g^2-h^2+d^2-e^2)*f-d^2*h+(e^2-h*(g-h))*g)*((-e+d)*f+e*g-d*h))*((a-b)*c-a*e+d*b))/(((a-b)*c-a*e+d*b)*(((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^2+(-2*e*a^2+2*b*(d+e)*a-2*b^2*d+(1/1065800)*(g-h)*((-e+d)*f+e*g-d*h))*c+(h^2+e^2+f^2-2*f*h)*a^2-2*b*(f^2+(-g-h)*f+d*e+g*h)*a+(f^2+d^2-2*f*g+g^2)*b^2-(1/2131600)*((-e+d)*f+e*g-d*h)^2))
z = (-1460*(-9685390482496000000*(b^2-(1/2131600)*c^2+(1/1065800)*e*c-(1/2131600)*e^2-(1/2131600)*(f-h)^2)*(a^2-2*a*b+b^2-(1/2131600)*d^2+(1/1065800)*d*e-(1/2131600)*e^2-(1/2131600)*(g-h)^2)*((c-e)*a-(-d+c)*b)^2*(a^2-(1/2131600)*c^2+(1/1065800)*c*d-(1/2131600)*d^2-(1/2131600)*(f-g)^2))^(1/2)+((g-h)*d+(h-g)*e)*c^3+((2131600*b^2-4263200*a*b-e^2+2131600*a^2-d^2+2*d*e)*f+(-g+2*h)*d^2+(-g-h)*e*d+(2*g-h)*e^2-g^3+h*g^2+(-2131600*a*b+2131600*a^2+h^2)*g-h^3+(2131600*b^2-2131600*a*b)*h)*c^2+(((g-h)*d+(h-g)*e)*f^2+(d^3-d^2*e+(4263200*a*b-e^2-2131600*a^2-2131600*b^2+g^2-h^2)*d+e^3+(4263200*a*b-2131600*a^2+h^2-g^2-2131600*b^2)*e)*f-h*d^3+(2*g-h)*e*d^2+((-g+2*h)*e^2-h*g^2+(-h^2-2131600*b^2)*g+2*h^3+(-4263200*b^2+4263200*a*b+2131600*a^2)*h)*d-e^3*g+(2*g^3-h*g^2+(4263200*a*b+2131600*b^2-h^2-4263200*a^2)*g-2131600*h*a^2)*e)*c+(2131600*b^2-4263200*a*b-e^2+2131600*a^2-d^2+2*d*e)*f^3+(d^2*h+(-g-h)*e*d+e^2*g+(2131600*a*b-2131600*b^2)*g+(2131600*a*b-2131600*a^2)*h)*f^2+(-e*d^3+(2*e^2+2131600*a*b+h^2)*d^2+(-e^3+(-8526400*a*b+2131600*b^2-g^2-h^2+2131600*a^2)*e)*d+(g^2+2131600*a*b)*e^2+(2131600*a*b-2131600*b^2)*g^2+(2131600*a*b-2131600*a^2)*h^2+9087437120000*b^2*a^2-4543718560000*b^3*a-4543718560000*a^3*b)*f+e*h*d^3+((-g-h)*e^2+2131600*b^2*g-h^3+(2131600*b^2-2131600*a*b)*h)*d^2+(e^3*g+(h*g^2+(h^2-2131600*b^2)*g-2131600*h*a^2)*e)*d+(-g^3+(-2131600*a*b+2131600*a^2)*g+2131600*h*a^2)*e^2+2131600*b^2*g^3-2131600*b*g^2*a*h+(-2131600*b*a*h^2+4543718560000*b^3*a-4543718560000*b^2*a^2)*g+2131600*a^2*h^3+(4543718560000*a^3*b-4543718560000*b^2*a^2)*h)/(4263200*((1/1460)*g+a-b-(1/1460)*h)*(-(1/1460)*g+a-b+(1/1460)*h)*c^2+(4*(g-h)*(-e+d)*f+(-4*g*h+4*h^2+8526400*b*(a-b))*d-8526400*e*(-(1/2131600)*g^2+(1/2131600)*g*h+a*(a-b)))*c+4263200*((1/1460)*d+a-b-(1/1460)*e)*(-(1/1460)*d+a-b+(1/1460)*e)*f^2+(4*d^2*h-4*(g+h)*e*d+4*e^2*g-8526400*(a-b)*(a*h-g*b))*f+(4263200*b^2-2*h^2)*d^2+(-8526400*a*b+4*g*h)*e*d+(4263200*a^2-2*g^2)*e^2+4263200*(a*h-g*b)^2)
}
Sorry, I know the formatting is not nice, but reformatting it by hand takes too much time.