nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

In Maple help on int, it says

"If Maple cannot find a closed form expression for the integral, the function call itself is returned"

But then, what is the correct way to check for this in the code? How do I know that the result returned is the call I made? (it would have been easier if these functions throw an error, or set some status code that one can check for success or failure).

Why this simplifes:

z1:=n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));

simplify(z1);

But when adding an extra term to z1, it no longer simplfies the above any more:

z2 := cos(x)^(n-1)*sin(x)+n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));

simplify(z2);

You can see the second term, which is z1, was not simplfied any more.

Why? And how would one go about simplifying z2 such that the second term gets simplfies as with z1, but while using z2 expression. It seems simplify stopped at first term and did not look ahead any more?

Maple 18.02, windows.

Given expr:=sin(n*x); and say I want to find its value at n=1,x=Pi/2, I found I can do

subs({n=1,x=Pi/2},expr); eval(%);

or combine into one

eval(subs({n=1,x=Pi/2},expr); ----(1)

But also one can write

eval(expr,{n=1,x=Pi/2}); ----- (2)

So if someone wants to just find value of expression as above, it seems (2) is much simpler than (1) since no need to call subs, it is done automatically. Is there anything else I am overlooking?

Only problem I see in the above, is that subs() uses different order: subs({},expr), while eval is:  eval(expr,{}); The other way around.

It would have been better if the order was the same in the API, to reduce confusion.

 

 

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?

 

 

First 181 182 183 184 185 186 187 Last Page 183 of 199