Take the 2-minute tour ×

Hello I am new to matlab I have problem solving this simple expression


This expression is basically a result of the simple integeral equation I coded but now I am unable to solve this equation what i want is to simplify and the answer should look like

share|improve this question
Have you tried anything? –  jazzbassrob Apr 27 '13 at 8:45
add comment

closed as not a real question by Paul R, Shai, tkanzakic, Soner Gönül, bipen Apr 29 '13 at 7:51


1 Answer

The symbolic toolbox can do this:

syms y                   % Declare symbolic variable y
simplify(r)              % Simplify expression

Note that, for precision, you will get the answer as a fraction:

10*cos(y) - 3062566590353811/562949953421312

You can use the vpa command to represent this as a single number:

vpa(simplify(r) )

With the result:

10.0*cos(y) - 5.4402111088936973004592800862156
share|improve this answer
add comment
