MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Naveen Ramesh
on 8 May 2013

Hi guys,

I am facing a problem in matlab here..

I have an equation that contains the unknown quantity on the right side of the eqaution also.

But somehow, matlab doesnt simplify the equation and i get no result.

I really dont know how to simplify this eqation.

this is my equation

a = (2.s_t)/((((2*s_1)/((a*cos(alpha))-(g*sin(alpha - xi)) - mu((a*sin(alpha))+g*cos(alpha - xi))))^0.5) + (((2*s_1)/((a*cos(beta))+(g*sin(beta+xi))))^0.5))

If anybody could give me a solution, i d be grateful

Thanks once again... !!!!

*No products are associated with this question.*

Answer by Youssef KHMOU
on 8 May 2013

hi,

You mean algebraic simplification? you need to use the cos(a+b)/sin(a+b) properties ,

if you mean numerical simplification then break it into parts :

A=2*s_t; B=(((2*s_1)/((a*cos(alpha))-(g*sin(alpha - xi)) - mu((a*sin(alpha))+g*cos(alpha - xi))))^0.5); C= (((2*s_1)/((a*cos(beta))+(g*sin(beta+xi))))^0.5);

a=A./(B+C);

Answer by Walter Roberson
on 8 May 2013

If you examine the structure of the equation, and substitute constants for some expressions that are independent of "a", and then bring the denominator of the right side up, you can arrive at a structure of the form

a*(sqrt(s_l/(a*c1+c2))+sqrt(s_l/(a*c3+c4))) = 2*a_l

This can be solve()'d for a, and the answer will be of the form

(s_l-T^2*c2)/(T^2*c1)

where T is

RootOf((-c3*c2^3+c4*c1*c2^2)*z^6 + (4*c4*a_l*c1^2*c2-4*c3*a_l*c1*c2^2)*z^5 + (3*c3*s_l*c2^2-2*c4*c1*s_l*c2-4*c3*a_l^2*c1^2*c2+4*c4*a_l^2*c1^3-s_l*c1*c2^2)*z^4 + (-4*c4*a_l*c1^2*s_l+8*c3*a_l*c1*s_l*c2)*z^3 + (2*s_l^2*c1*c2+4*c3*a_l^2*c1^2*s_l-3*c3*s_l^2*c2+c4*c1*s_l^2)*z^2 - 4*c3*a_l*_Z*c1*s_l^2-s_l^3*c1+c3*s_l^3, z)

Here, Rootof(f(z),z) means the set of values of z such that f(z) is 0 -- i.e., the roots of the 6th order polynomial.

Unfortunately for you, there is no general analytic solution for the roots of a 6th order polynomial.

It is not *impossible* that substituting back from the original expression into the constants here would happen to give you coefficients that simplified sufficiently to reduce the polynomial degree down to 4, but I highly doubt that to be the case here.

Still, as it is the *square* of the root of a 6th order that is needed, *possibly* the expression could be transformed into the roots of a 3rd order; whether that is possible is out of my depths.

## 3 Comments

## Walter Roberson (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/75055#comment_147988

I take it that initial "2.s_t" should be "2*s_t" ?

## the cyclist (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/75055#comment_147989

Can you be more explicit by what you mean by "simplify"? Are you trying to solve for

ain this equation, or do something else?## Naveen Ramesh (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/75055#comment_148196

yes.... It is '' 2*s_t''.. and yes... i am trying to solve for 'a'.......