Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: problems integrating a function
Replies: 5   Last Post: Jan 5, 2011 11:38 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Oleg Komarov

Posts: 896
Registered: 1/14/10
Re: problems integrating a function
Posted: Jan 4, 2011 9:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Marcio Barbalho" wrote in message <ig0hh0$pvb$1@fred.mathworks.com>...
> Please,
> Could any of you find the numerical solution to the integral of sin[(x-pi)/sqrt(x)] from pi/100 to pi?
>
> S = int(sin((x-pi)/sqrt(x)),x=pi/100..pi)
>
> You may copy and paste there.
> I have already tried both Matlab and Scilab.
>
> From Matlab I get:
> Warning: Explicit integral could not be found.

> > In sym.int at 64
> In char.int at 9
> ans =
> int(-sin(1/x^(1/2)*(pi - x)), x = pi/100..pi)
>
> From scilab (I installed scilab just to integrate this function):
> -->integrate('sin((x-%pi)/sqrt(x))','x',0,%pi)
> !--error 24
> Convergence problem...
> at line 70 of function integrate called by :
> integrate('sin((x-%pi)/sqrt(x))','x',0,%pi)
>
> The solution is -1.295820
>
> I just can't get Matlab to find it.
>
> Many thanks


quadv(@(x) sin((x-pi)/sqrt(x)),pi/100,pi)

Oleg



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.