pagan

5147 Reputation

23 Badges

17 years, 122 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are answers submitted by pagan

Can you define W as Vector(Neq,i->CS[i](x,y,t)) ?

You should see two tiny arrowheads at the top of the vertical bar that forms the right-hand-side of the palette pane. One points left and collapses the palette sidebar, and the other points right and expands it.

Is this not correct?

> simplify(LegendreQ(1,x)) assuming x::real;
                     1/2 x ln(1 + x) - 1/2 x ln(x - 1) - 1
You might also check out these.
FunctionAdvisor('specialize',LegendreQ(1,x),hypergeom);
FunctionAdvisor('specialize',LegendreQ(1,x),elementary);

Have a look at the help page for iscont (and maybe also for discont and fdiscont).

I would have guessed that there was a solution for this with embedded components. Something simple, like two Math Containers and a Text Area. The student enters 2D Math in MathContainer0, and a value for the unknown in the Text Area.

The action (upon change to the Text Area) would to grab the value of MathContainer0, figure out what the unknown is, evaluate the expression using the supplied value for the unknown, and Do the result to MathContainer1.

The help-page for MathExpressionComponent indicates that this fragment should be able to pick off the value of MathContainer0.

MathML[ImportModified](DocumentTools[GetProperty]('MathContainer0','value'));

It just doesn't seem to work, though, if MathContainer0 has 2D Math in it. Sure, it works ok with the help example if one first does something like this,

DocumentTools[Do](%MathContainer0 = (Int(sin(x), x) = int(sin(x), x)));

But that puts 1D Maple input into MathContainer0.

If, instead, I enter the 2D Math form of the lhs of that expression directly into MathContainer0, using command-completion to turn `Int` into its 2D Math form, then the ImportModified call above no longer works. It complains with an error message about an invalid neutral operator.

I guess that I don't understand. 2D Math input mode seems so important to current Maple. Can it not be used for input in embedded components? Hopefully I am simply doing something basically wrong.

You say that x[0]=0. Is x[n+1] also zero? If not, what is x[n+1] in your generating equation formula, when i=n?

It's a linear system. You might try to form it as a Matrix equation, A.X=B, so that you could use routines from the LinearAlgebra package on it.

What does Maple know about t?

> int(Dirac(x)*exp(t-x), x = 0 .. t) assuming t>0;
                                  1/2 exp(t)
 
> int(Dirac(x)*exp(t-x), x = 0 .. t) assuming t<0;
                                  -1/2 exp(t)

Why are you integrating from 0, rather than -t?

Are you content with these?

> int(Dirac(x)*exp(t-x), x = -infinity .. infinity);
                                    exp(t)
 
> int(Dirac(x)*exp(t-x), x = -t .. t) assuming t>0;
                                    exp(t)
 
> int(Dirac(x)*exp(t-x), x = -t .. t) assuming t<0;
                                    -exp(t)
 
> int(Dirac(x)*exp(t-x), x = -t .. t);
                          (2 Heaviside(t) - 1) exp(t)
<A[1..-1,1..2],A[1..-1,3..4],A[1..-1,5..6]>;

There is already a script named xmaple, which is located in the bin directory alongside the `maple` and `mint` scripts. It does this.

"${MAPLE}/bin/maple" -x $*

But that script starts a new instance of the Maple GUI and does not open a new tab in a currently running instance. Many Linux filemanagers can be set up to associate the .mw extension with some script or command.

And now for something completely different...

We can already see Maple's INTERFACE_HELP help-page, which explains that command for opening help-pages in a running session. Eg,

INTERFACE_HELP(display,topic=int);

It didn't take much experimenting to come up with the following, which opened my foo.mw file.

INTERFACE_WORKSHEET(display,file="foo.mw");

Now, maybe one could have Maple open a Socket and then run a Maple (child) Thread which listened for such strings and executed them. That could run "in the background". And a shell script (and perhaps an executable) might be conjured up which could form and pump such strings into the other end of the socket. Some handshaking could be attempted, so that the script determined whether a Maple GUI session was in fact running and listening to the socket. This might be an avenue to prodding the running GUI to open a worksheet, from outside Maple itself (with the shell script being run from a terminal or by a filemanager with .mw association).

I'm not sure whether I understood your syntax.

> sys:=diff(C(t),t)=C(t)*(1-0.0002*C(t));
                           d
                    sys := -- C(t) = C(t) (1 - 0.0002 C(t))
                           dt
 
> dsolve({sys,C(0)=2});
                                         5000
                            C(t) = ----------------
                                   1 + 2499 exp(-t)

There one or two "methods" available to evalf/Int which may be suited to higher dimension numerical quadrature, but both require finite constants on the limits of integration.

The idea is that the "dimensional effect" can be a killer. As the number of dimensions goes up, the amount of inner integrations can become huge. So-called "product rules" can suffer terribly from this.

So I would ask, could you make a set of variable transformations so that each integration range has finite endpoints? And then try passing method=_cuhre to evalf(Int(...)?

You could also set infolevel[`evalf/int`] to 1 or higher, to see how it is progressing or what the issues are. You might also try passing the epsilon option, to allow it to get less digits of final accuracy without having to raise Digits above the evalhf cutoff. With as many as 10 iterated integrals, you may well need the speed of evalhf for all the many evaluations of the integrand.

 

Which delimiters should be chosen for it? Why does Mathematica get mentioned here, but not Maple?

Is this of any use?

I1 := Int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi):
I2 := student[changevar](s=t*phi*2/Pi,I1,t);
value(I2) assuming k > 0, k < 1, phi > 0;
map(convert,%,EllipticF);

Maple is not as strong as Ramanujan was.

Can you use LinearAlgebra[Generic] to accomplish this in Maple 12?

> with(LinearAlgebra[Generic]):

> F[`0`] := 0:
> F[`1`] := 1:
> F[`=`] := (x,y)->evalb( x=y ):
> F[`+`] := `+`:
> F[`-`] := `-`:
> F[`*`] := (x,y) -> x &* y:
> F[`/`] := (x,y) -> x &/ y:

> R:=Matrix(2,2,[[R11,R12],[R21,R22]]);
                                    [R11    R12]
                               R := [          ]
                                    [R21    R22]
 
> X:=Matrix(2,2,[[A,B],[C,D]]);
                                      [A    B]
                                 X := [      ]
                                      [C    D]

> MatrixMatrixMultiply[F](R,X);
             [(R11 &* A) + (R12 &* C)    (R11 &* B) + (R12 &* D)]
             [                                                  ]
             [(R21 &* A) + (R22 &* C)    (R21 &* B) + (R22 &* D)]

Getting fancier...

> MatrixInverse[F](X);
    [((1 &/ A) &* 1)
 
     - (((1 &/ A) &* B) &* (%1 &* (((1 &/ C) &* 0) - ((1 &/ A) &* 1)))) ,
 
    ((1 &/ A) &* 0)
 
     - (((1 &/ A) &* B) &* (%1 &* (((1 &/ C) &* 1) - ((1 &/ A) &* 0))))]
 
    [%1 &* (((1 &/ C) &* 0) - ((1 &/ A) &* 1)) ,
 
    %1 &* (((1 &/ C) &* 1) - ((1 &/ A) &* 0))]
 
%1 := 1 &/ (((1 &/ C) &* D) - ((1 &/ A) &* B))

> F[`*`] := proc(x,y)
> if x=F[`1`] then return y;
> elif y=F[`1`] then return x;
> elif x=F[`0`] or y=F[`0`] then return F[`0`];
> elif type(x,constant) or type(y,constant) then return x*y;
> else return x &* y;
> end if;
> end proc:

> MatrixInverse[F](X);
    [(1 &/ A) - (((1 &/ A) &* B) &* (%1 &* (-(1 &/ A)))) ,
 
    -(((1 &/ A) &* B) &* (%1 &* (1 &/ C)))]
 
    [%1 &* (-(1 &/ A)) , %1 &* (1 &/ C)]
 
%1 := 1 &/ (((1 &/ C) &* D) - ((1 &/ A) &* B))

> F[`/`] := proc(x,y)
> if type(x,constant) or type(y,constant) then return x/y;
> else return x &/ y;
> end if;
> end proc:

> MatrixInverse[F](X);
    [1/A - ((1/A &* B) &* (%1 &* (- 1/A))) , -((1/A &* B) &* (%1 &* 1/C))]
 
    [%1 &* (- 1/A) , %1 &* 1/C]
 
                 1
%1 := -----------------------
      (1/C &* D) - (1/A &* B)

And you could further redefine the members of F as you wish.

It's just an idea.

First 45 46 47 48 Page 47 of 48