Items tagged with pi pi Tagged Items Feed

sin(Pi*1.0) returns -4.102067616*10^(-10). How do i make it return exact zero?

Hi,

So I have a simple while loop and keep receiving this error and have no idea how to fix it. I don't get why it works for the first few, and then the error starts. Here is my code and output:

Input:

restart;
n:=0:
x:=Pi/3;
m:=0:
total:=0:
while abs(1/2-total) > 10^(-8) do
k:=((-1)^(n/(2))*x^(n))/(n!):
total:= total +k;
evalf(total, 11);
print(%);
n:=+2;
end do:

OUTPUT:
1
- Pi
3
1.
0.45168864437
Error, cannot determine if this expression is true or false: 0 < -50000001/100000000+(1/18)*Pi^2

 

Why does it think i'm asking if something is greater than 0? Any help??

one of the most confusing thing for me with learning Maple, is pi vs. Pi. I keep mixing them up since do not remember half the time which one to use.

What is the point of having both? Mathematica only has Pi. If one wants numerical value for it, simply do N[Pi] which is similar to Maple evalf(Pi).

I just spend 5 minutes trying to figure why int((sin(x))^3*sin(k*x),x=-pi..pi); was giving me

 

While in Mathematica it gives

Then I noticed the Pi vs. pi, and now Maple gives same output.

Why pi was even introduced? was this done early on, or added in later versions? Why not keep Pi a symbolic and with evalf it gives numerical value as with Mathematica? Also, would one use pi?  It if just symbol (evalf(pi)) does nothing, then what is its use? if I can see a good use for pi vs. Pi, may be I'll understand the logic behind this duel system.

 

 

Hello everybody,

 

I find a answer on that subject at this link: http://www.mapleprimes.com/maplesoftblog/95508-Monte-Carlo-Pi

But for starting easy, I try this:

with(RandomTools[MersenneTwister]);
directpi := proc (n)
local i, x, y, N;
N := 0;
Digits := 2;
for i to n do
x := GenerateFloat();
y := GenerateFloat();
if x^2+y^2 < 1 then
N := N+1:
end if:
end do:
N;
end proc;


evalf(directpi(4000)/(1000.0), 4);

                             3.176

I would like to know if this code is appropriate and if it is possible to have a random number between -1 to 1 so it will be easier to plot the points in the square with the circle inside.

 

Thank you.

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

 

 

i have a large angle and i wish to represent this angle called theta in the range [0 2*Pi]. In matlab this is done by the command mod(theta, 2* Pi). ihave tried frem and mod in maple but the two cannot accept 2*Pi as a second argument 

how can i do that 

Hi,

 

I am completely new to Maple (and this kind of software in general).

I am just on my first steps of learning...but I quickly noticed, that if I write Pi and hit enter, I do not get

the well-known greek Pi-symbol. I get an ordinary "p" as the result.

I checked the greek-palette...nearly all items in this palette are ordinary letters.

Does anyone have an idea whats wrong?

BTW: I don`t know if it could have to do with that, but I use a german windows 7 installation.

 

Thank you,

regards,

Kai

Maple has a number of protected names that cannot be redefined without some work.

A common request is to use the letter j or J instead of the default I for the imaginary unit. Also common is to be able to use the letter I as an ordinary variable, rather than as an imaginary unit. For this, there is a very convenient interface command.


restart;

(-1)^(1/2);

I

interface(imaginaryunit=J):
(-1)^(1/2);
 
 J

(There...

Greetings to all.

A recent post at math.stackexchange.com asked for good approximations to pi using the nine nonzero digits, the four arithmetic operations and exponentiation. The problem definition definitely suggests a computational solution, which is actually non-trivial because the search space of all legal mathematical expressions over the nine digits and with the aforementioned operations is so huge that it cannot possibly be searched exhaustively.

Dear friends,

I am reporting with a brief comment concerning the integral int(1/(1+x^a), x=0..infinity) with a>=2 a real number. This was evaluated here.

Now Maple 15 (X86 64 LINUX) will quite happily compute this in its most simple form involving the sine when a is not a positive integer or a rational number. If it is, however, a beta function term results,...

Hello everybody,

I just realised Maple is allowed for my upcoming exam after New Year.

My plan is to have templates of the most common math problems, I might encounter for quick solutions.

Anyway, I have run into a problem with Laplace shifted data, particularly initial value problems. I have been searching for HOURS, and feel like I have look up everything on google, maplesoft and other sites without succes.

I hope some of you are able to help me. The exercise is:

pithe eight digits of your student Id number are used to individualise the questions. they are labelled a1a2a3a4a5a6a7a8a.. all non interger outputs should be to 3 decimal places. question 1_ depending of your own value of a8, write a program that performs the calculation below:

a8             ...

Hi, I have created 2 annulus;

 

> display(sector([2, -5.5], 2.5 .. 3.5, (1/5)*Pi .. (1/2)*Pi, color = "Niagara Burgundy"), axes = none, scaling = constrained);
%;

> display(sector([5, -5], 1 .. 1.5, (1/5)*Pi .. 2*Pi, color = "Green"), axes = none);
 
But I want the green annulus to cross the Niagara Burgundy annulus at the points where the green annulus is open. The green annulus is open with an angle...

How do I look for a 9 digit pi-sequence within decimal places of the EULER e  and find the position of that string.

2,71828182..............314159265..........

      123.....................x

can someone show me screen shot how to do this??

thanks so much

Horst

hi 

if I have two partition Pi and Pi 'I want to know the decomposition of Pi' 

So I want to display a plot containing a spiral and a polygon graph approximating the shape. I use a seq to make the points in pointplot3d and then connect them with the connect option. It looks like this:

y(t):=t-><cos(t),sin(t),t>:
graph := spacecurve(y(t), t = 0 .. 6, thickness = 3, axes = box, color = blue):
poly6 := pointplot3d({seq([cos(t), sin(t), t], t = 0 .. 6, 1)}, connect, axes = box, 
color = red, thickness = 3, caption = {n = 6}):
1 2 3 Page 1 of 3