# How to Simplify an symbolic expression

3 views (last 30 days)

Show older comments

Hi all, I want to simplify this equation

a= 2 atan((-2+Sqrt(4-gama^2 *l^2* M^2-4* gama *l* M^2 *tan(gama/2)+4* tan(gama/2)^2-4 *M^2 *tan(gama/2)^2))/(gama* l* M+2* tan(gama/2)+2* M* tan(gama/2)))

into this form

a= (gama/2)-asin(((gama*l*M)/2)*cos(gama/2)+M*sin(gama/2))

Can anyone help?

### Answers (2)

Andrew Newell
on 21 Apr 2017

If I define

a= 2*atan((-2+sqrt(4-gama^2 *l^2* M^2-4* gama *l* M^2 *tan(gama/2)+4* tan(gama/2)^2-4 *M^2 *tan(gama/2)^2))/(gama* l* M+2* tan(gama/2)+2* M* tan(gama/2)));

b = (gama/2)-asin(((gama*l*M)/2)*cos(gama/2)+M*sin(gama/2));

and substitute pi for gama,

subs(a,gama,pi)

subs(b,gama,pi)

I get a==NaN and b==pi/2 - asin(M). So they are not the same. I find that applying simplify to a does not change it significantly.

Walter Roberson
on 21 Apr 2017

##### 8 Comments

Andrew Newell
on 23 Apr 2017

### See Also

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!