nm

10214 Reputation

19 Badges

12 years, 146 days

MaplePrimes Activity


These are questions asked by nm

sometimes when I download something from Maple apps centers, such as this package, http://www.maplesoft.com/applications/view.aspx?SID=33406  I find the example documents there are written in .mw and when I open them, there are in document mode style, the fancy word like style which I can't stand looking at.  It has all the math input in italic and maple commands look different from classic Maple text. It very confusing, since I see something as   (0<x<1) which is valid in this document mode, but in classical maple, this is not valid code.

 

It seems Maple has 2 different syntax. One that works in document mode and one that is classical text maple.

I like to use only input as Maple notation which these documents do not do.

Is there a way to convert such .mw file to become standard classic worksheet mode? I know I will lose the chapter/section heading and all that.  I also tried selecting all in the document, then did Tools->options->Display->Input display->Maple notation, but nothing happend to the open document. It remained document mode with 2D math input.

When I save it as .mws, and open it again, it remains on document mode.

How to convert such documents to classical Maple syntax?

 

 

Was trying to see if I can get the reduction formulas for int(cos(x)^n,x) in maple. But it seems no assumption used can make Maple give any result for this.  Mathematica gives a result using Hypergeometric2F1 (even with no assumption on n, which I am not sure about now), but was wondering why maple can't do this one:

 

restart;
int( (cos(x))^n,x) assuming n::integer;


                     
int( (cos(x))^n,x) assuming n::posint;
                        same

In Mathematica, I get:

I am newbie in Maple, so may be I am missing some command or doing something wrong.

ps. I was trying to obtain

But this is lost case now. I just need to find out first why int(cos(x)^n,x) does not evaluate to anything in Maple.

fyi, the Hypergeometric result for $\int cos^n(x) \,dx$ can be seen in this reference (half way down the page):

http://www.integraltec.com/math/math.php?f=cosPower.html#cos

ps. can't one enter Latex in this forum like at stack exchange?

 

 

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.

 

 

How would one in Maple solve this, which is an inequality equation in some variables, which can be nonlinear, with constraints on range of each variable. I.e. I want to find conditions on the variables to make the inequality satisfied.

In Mathematica, I use the Reduce command

Clear[x, y];
eq = 1/2 - x + x^2 - y + y^2;
Reduce[{eq > 0, 0 < x < 1 && 0 < y < 1}, {x, y}, Reals]

How would one do the same in Maple? I tried solve, but can't give constraints.

restart;
eq:=1/2 -x+x^2-y+y^2:
solve(eq>0 , {x1, x2});

So I need to do the same as in the Mathematica command, but in Maple. I do not want numerical solution, but algebraic as shown above.

Using Maple 18.2 on windows.

I noticed this in Student:-NumericalAnalysis:-Romberg, here are the lines of interest:

The question  is: Why create rtable, apply algorithm, then convert to Matrix at end? Why not replace line 4 below with Matrix command from start? Could not the same thing be done using Matrix from the start?

-----------------------------------------
proc(expr, var, a, b, n)
local f, R, j, k, i, oldDigits;
   4   R := rtable(1 .. n,1 .. n,('storage') = ('triangular')['lower']);  #Why not create Matrix here?
   6   R[1,1] := evalf(1/2*(b-a)*(f(a)+f(b)));
   7   for k from 2 to n do
   8     R[k,1] := 1/2*evalf(R[k-1,1]+(b-a)/(2^(k-2))*add(f(a+(2*i-1)*(b-a)/(2^(k-1))),i = 1 .. 2^(k-2)))
       end do;
  10   for j from 2 to n do
  11     for k from j to n do
  12       R[k,j] := evalf(4^(j-1)*R[k,j-1]-R[k-1,j-1])/(4^(j-1)-1)
         end do
       end do;
  13   R := evalf[oldDigits](R);
  14   return convert(R,Matrix,('shape') = ('triangular')['lower']) #Why not use Matrix from the start?
end proc
------------------------------------------

Maple 18.02

First 168 169 170 171 172 173 174 Last Page 170 of 185