# Homework Help: MAPLE help - plotting integration equation

1. Feb 28, 2012

### fishspawned

1. The problem statement, all variables and given/known data

Does anybody out there have a good knowledge of maple? i am trying to plot out some equations and having a bit of a snag and not sure how to define my variables to make this work. The integral has a constant that ranges from zero to under 1 and this seems to be giving me a foul up .

2. Relevant equations

Maple 15 [not the classic version]

3. The attempt at a solution

here's an image of my attempt

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Feb 28, 2012

### Ray Vickson

Possibly, Maple does not know what sin^2(x) is; it wants sin(x)^2 instead. Also, Maple thinks that pi is just some unspecified parameter; if you really mean Pi = 3.14169... , you should write that: Pi is a reserved constant, but pi is anything at all. The following works just fine:

f:=1/(1-b^2*sin(x)^2);

J:=Int(f,x=0..Pi/2):

Note the use of Int instead of int. Int is the inert or delayed-evaluation form of the int command; it does not evaluate the integral, but gets it ready for evaluation in future commands.

value(J) assuming b>0,b<1;

Pi/(2*sqrt(1-b^2))

Sometimes it is important to delay evaluation of the integral until after you apply assumptions; usually I prefer to apply assumptions locally, using the "assuming" form, rather than globally, using the "assume" command.

However, you could issue the global command assume(b>0,b<1) as you did, then issue the command int(f,x=0..Pi/2). That would give you the same result, but with b printed out as b~; you don't get that annoying tilde if you use the local "assuming" form instead. (There are ways of re-setting the Maple environment so that trailing tildes are not displayed on assumed parameters.)

RGV

Last edited: Feb 28, 2012
3. Feb 28, 2012

### fishspawned

thank you. there are aspects of Maple that really bother me. I had the same type of trouble all throughout my Physical Chemistry class. this pause before evaluating with assumptions is something i have not seen before and it really would have been useful well before this. Better now than never.

4. Feb 28, 2012

### Ray Vickson

Well, I hate to suggest it, but why not buy a book on the subject? There are many books about Maple, ranging from very elementary to quite advanced. Maple is a great program, but it IS a piece of very complex software, and has its quirks, too. There are also numerous tutorials or on-line courses on Maple available for _free_ download from the web, and many of them would deal exactly whit the sort of issues you had. In particular, it is often best to use delayed evaluation (and maybe numerical evaluation) when plotting functions involving and integration. For example, if you have a function f = f(x,a) and you want to plot F(a) = ∫ f(x,a) dx, x = b..c it is sometimes best to use Fa:=evalf(Int(f,x=b..c)) and then say plot(Fa,a=a_min ..a _max). That will work even if the integral does not have a closed-form formula.

RGV