They are exactly the same!!!
You know the following trigonometric identity right?
cos a * cos b = 0.5*(cos(a+b) + cos(ab))
In your case, a = y and b = wt  y.
"Good " <modeebuo@yahoo.co.uk> wrote in message <gv9t5p$qk1$1@fred.mathworks.com>...
> Hi Friends,
> This problem is to be solved by symbolic math but the solution it gives me does not tally with what the actual solution should be:
>
> The problem is to integrate a symbolic function of x, y, w and t with respect to x and evaluate the integrand from pi/2 to pi/2. So the code below was written:
>
> syms N x y w t real
> A = N*cos(xy)*cos(w*ty);
> B = int(A, x, pi/2, pi/2);
>
> The expected solution is:
>
> B should equal N*sin(xy)*cos(w*ty) evaluated at (x=pi/2) minus same expression evaluated at (x=pi/2). Naturally, the final solution should be:
>
> B = N*(sin(pi/2y)  sin(pi/2y))*cos(w*ty) = 2*N*cos(y)*cos(w*ty).
>
> Symbolic toolbox gives me:
>
> B = N*cos(w*t+2*y)+N*cos(w*t)
>
> I cannot see how this solution is correct.
>
> Please I need this clarified so as to continue using this wonderful tool.
