Maple 12
Can do this integral numerically, but not analytically:
> restart;
f:=exp(cos(x))*cos(x-sin(x));
int(f,x=0..2*Pi);
------> returns unevaluated
> restart;
f:=exp(cos(x))*cos(x-sin(x));
evalf(Int(f,x=0..2*Pi));
6.283185307
OK.
I do not have Maple13, but was wondering if it can do it in Maple13?
--Nasser
Plotting and playing suggests f:= x -> exp(cos(x))*cos(x-sin(x)) is
periodic and symmetric like cos, actually both f(Pi+x) - f(Pi-x) and
f(2*Pi+x) - f(x) are zero, so the task is 2*Int(f(x), x= 0 .. Pi)
Smells like a Fourier thing ... playing with exp(cos(x)+I*sin(x)) and
differentiating gives
Int(f(x),x=0..Pi); expand(%);
Pi
/
|
| exp(cos(x)) cos(x) cos(sin(x))
|
/
0
+ exp(cos(x)) sin(x) sin(sin(x)) dx
And exp(cos(x)+I*sin(-x)); evalc(Im(%)); diff(%, x);
-exp(cos(x)) cos(x) cos(sin(x)) + exp(cos(x)) sin(x) sin(sin(x))
Now -exp(cos(x))*sin(sin(x)) is 0 in 0 and in Pi and an antiderivative,
hence the task is
Int(2*exp(cos(x))*cos(x)*cos(sin(x)),x = 0 .. Pi)
which Maple 12 evaluates to be Pi.
Done.
hi Alex;
But Pi is the WRONG answer. It should be 2 Pi?
--Nasser
Maple 11, 12, 13 can do it if we expand f first:
int(expand(f), x=0..2*Pi);
The result is 2*Pi.
--
Rouben Rostamian
As said: your original integral is twice of it. Axel
Alex, With the transformation you did, I was not sure if Pi you showed above
is the answer to the same problem I had.
The analytical answer to
f:=exp(cos(x))*cos(x-sin(x));
int(f,x=0..2*Pi);
should be 2 Pi, not Pi.
--Nasser
Much better than my way ...
I want to ask new integral such as
f:=(t-a)^c/(b-t)^d; #a,b,c,d are contant
How can I found analytical integral solution
Firat
Well, int(t^c*(1-t)^d,t=0..1); is the Beta function.
Change variables x=(t-a)/(b-a) to reduce yours to the case a=0, b=1.
Then since yours is the indefinite integral, it would be called an
"incomplete Beta function" I suppose. Maple reports
Int(x^c*(1-x)^(-d), x) = x^(c+1)*hypergeom([d, c+1], [2+c], x)/(c+1)
--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/
Thanks for your answer. But I have some problem. I wrote my maple file
as you say in the following form:
with(student):
F:=Int((t-a)^c/(b-t)^d,t);
/ c
| (t - a)
F := | -------- dt
| d
/ (b - t)
> changevar(x=(t-a)/(b-a),F,x);
/ c
| (x b - x a) (b - a)
| -------------------- dx
| d
/ (b - a - x b + x a)
> evalf(%);
/ c
| (x b - 1. x a) (b - 1. a)
| -------------------------- dx
| d
/ (b - 1. a - 1. x b + x a)
but it does not give any answer. Main problem is: this integral form
appear in my iteration statement and I have to use this integral value
for new iteration after previous iteration. I want to integrate this
function and get numerical value.
Is this possible?
Firat
I forget that the power c and d are non-intager value
You cannot get a numerical answer unless you specify numerical values
for a, b, c and the integration limits. Maple cannot read your mind.
>
> / c
> | (x b - 1. x a) (b - 1. a)
> | -------------------------- dx
> | d
> / (b - 1. a - 1. x b + x a)
>
> but it does not give any answer. Main problem is: this integral form
> appear in my iteration statement and I have to use this integral value
> for new iteration after previous iteration. I want to integrate this
> function and get numerical value.
You can write answer_above = (b-a)^(c+1-d) * int(x^c/(1-x)^d,x), and
then express this last integral in terms of an incomplete beta
function (or a hypergeometric function, as Maple seems to prefer).
>
> Is this possible?
Of course not. You have not said what are the values of a, b, c and
the integration limits.
R.G. Vickson
>
> Firat
In my previous message I said the power c and d are non-integer value.
I give some values as you say but it does not evulate integral for
example
>c:=0.3, d:=0.5;
>int(x^c/(1-x)^d,x);
params := {c = 0.3, d = 0.5}
> J:=int(x^c/(1-x)^d,x);
(c + 1)
x hypergeom([d, c + 1], [2 + c], x)
J := ------------------------------------------
c + 1
J1:=subs(params,J);
1.3
J1 := 0.7692307692 x hypergeom([0.5, 1.3], [2.3], x)
Of course, if we give numerical values for the integration limits we
will get a numerical evaluation:
J2:=subs(params,int(x^c/(1-x)^d,x=0 .. .97)): value(J2);
1.362551855
R.G. Vickson
Thanks for your kindly help and understanding. I am beginner in Maple.
I want to ask a question. I want to use the first example in Maplesoft
webpage
I wrote as follow
>with(Student(NumericalAnalysis));
`Error, NumericalAnalysis is not a command in the Student package\n`
and give above error message.
I want write this in Maple 10 classical worksheet. Please let me know
where I did wrong.
Firat
> Thanks for your kindly help and understanding. I am beginner in Maple.
> I want to ask a question. I want to use the first example in Maplesoft
> webpage
>
>
>http://www.maplesoft.com/support/help/AddOns/view.aspx?path=3DStudent%2fNum=
> ericalAnalysis%2fInitialValueProblem
>
> I wrote as follow
>
> >with(Student(NumericalAnalysis));
> `Error, NumericalAnalysis is not a command in the Student package\n`
I hope what you wrote was actually
with(Student[NumericalAnalysis]);
> and give above error message.
>
> I want write this in Maple 10 classical worksheet. Please let me know
> where I did wrong.
The NumericalAnalysis subpackage was first introduced in Maple 13. It
does not exist in Maple 10.
--
Robert Israel isr...@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
Actually, a little simplify will produce the desired result directly:
y := exp(cos(x))*cos(x-sin(x)):
ti := int(y, x=0..2*Pi):
simplify(ti, [trig]);
2 Pi
Bill
Thanks for your answer
Using simplify with the trig option is square brackets is equivalent
to issuing the command "expand" first, and then simplifying the
output. So simplify(ti, trig); is not the same as simplify(ti,
[trig]); Is this documented somewhere? I did not see this in the
help pages for simplify, or simplify/siderels
Regards,
Georgios
>
> Using simplify with the trig option is square brackets is equivalent
> to issuing the command "expand" first, and then simplifying the
> output. So simplify(ti, trig); is not the same as simplify(ti,
> [trig]); Is this documented somewhere? I did not see this in the
> help pages for simplify, or simplify/siderels
>
> Regards,
> Georgios
I agree that the help pages don't explain this well. If you want to
see what the difference is, try executing
> trace(simplify)
and then run the other commands. It's quite a bit different. Also try
'expand. to see how it calls 'simplify.'
Bill
Mele Kalikimaka to all