nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I prefer to write packge:-command(....) so I can see which package the command is from.

But sometimes I am forced to load  a package. Here is an example. IntegrationTools contains some useful types

At load time the IntegrationTools package defines three new types: Integral, DefiniteIntegral and IndefiniteIntegral, which can be used to access integrals involved in any given expression.

I thought I can access these just like the commands in the package, using ":-" notation, but this does not work

------------------
restart;
v := Int(sin(x), x);
type(v,IntegrationTools:-IndefiniteIntegral);
---------------------

 

Error, IndefiniteIntegral is not a command in the IntegrationTools package

But this works

-----------------------
restart;
with(IntegrationTools);
v := Int(sin(x), x);
type(v,IndefiniteIntegral);
----------------

It looks like :- only works to access functions/commands/procs in a package. and not to access types such as in this example.

Is there some other notation to use to reference types in package without having to load the whole package?

    

according to help on Combine

The Combine command combines integrals using linearity. The parameter v is any expression involving definite or indefinite integrals.

So, why I get an error from the following?

restart;
expr:=Int(sin(x),x) + Int(cos(x),x);

IntegrationTools:-Combine(expr);

Error, (in IntegrationTools:-Combine) invalid subscript selector

interface(version);
 Standard Worksheet Interface, Maple 18.02, Windows 7, October  20 2014

 

 

 

 

 

I am trying to learn the <> notation to enter matrices and vectors. But I find this page very confusing

http://www.maplesoft.com/support/help/maple/view.aspx?path=examples%2FLA_Syntax_Shortcuts

it says:

but we see clearly the vertical bars are used to separate columns.

Isn't a column the thing that goes from the top to bottom and not from left to right in Maple LinearAlgebra?

 

Sorry for basic question, Maple newbie here and I could not find answer using google.

I understand in Maple one uses the back quote key (or rather the apostrophe, 0X27) to prevent one time evaluation of expression. Hence when writing

'sin(Pi)'; #this remain sin(Pi)
%; # now we get 0

But when I tried it on fraction, it did not hold it:

'16/4'; #maple replied with 4

This might indicate that the front end parser did this simplification before the main evaluator got hold of it, so it was too late?

Either way, how would one make Maple return 16/4 when the input is '16/4'?

I am also not sure how to program a check in the code to determine that dsolve solved the differential equation.

For example

ode:=diff(y(x),x)-a*(x^n-x)*y(x)^3-y(x)^2=0;
sol:=dsolve(ode,y(x));

In this case, sol is () as it could not solve it. When I tried odetest, I get an error

odetest(sol,ode);

Error, invalid input: odetest uses a 2nd argument, ODE, which is missing

What is the correct way to check dsolve was successful that will work for all cases? I am looking for programmable method, no GUI use.

 

 

 

 

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