MATLAB Integration Situation

Go To StackoverFlow.com

0

I want to evaluate the integral of this function :

(cos(t^2)*sin(t)^2)^(1/2)    

over the period

-15*pi:50*pi

I am using these :

f=@(t) (cos(t.^2).*sin(t).^2).^(1/2);
quad(f,-15*pi,50*pi)

But i am getting warned:

Warning: Maximum function count exceeded; singularity likely.
> In quad at 110
In PPEL at 6

ans =

35.8252 +54.5673i

Most likely there is something stupid that i don't know about the theoretical part of the math, like some singularity as MATLAB said.

Moreover, when i want to evaluate this function sybolically with this :

int((cos(t.^2).*sin(t).^2).^(1/2))

It says : Warning: Explicit integral could not be found.

ans =

int((cos(t^2)*sin(t)^2)^(1/2), t)

What's the solution ?

2012-04-04 01:33
by Murat Şeker
Is your function really supposed to be the square root of (the multiplication of the (cos of the square of t) and the (square of the sin of t)) - Mark Elliot 2012-04-04 02:31


2

Plot the function without trying to do the integral.

What I notice is that you are going to be taking the square root of a negative number. I suspect that that isn't what you want to be doing...

2012-04-04 01:36
by PearsonArtPhoto
Ads