Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I would like the C-Text style in 14pt Times Roman while the C-2D-Math style is 12pt.

My use case is that I am typing in a single execution block.

I use Format >> Styles and select the style for C-Text and set it to 14pt Times. I click OK to close the dialog. Next I repeat this for the C-2D-Math style but this time set the font size to 12pt and, for testing, the colour to blue. The effect is to give me 14pt Times for both styles, though the C-text is black and the 2-D-Math is blue.

Can the effect I want be achieved, or is this a bug/feature?

This is Maple 2016.1 on Windows 10 64bit

 Thanks for any help

Hi everyone.

I'm going to solve a problem with HPM in Maple. I wrote some initial codes but now I'm confused becouse of P^0 coefficients in A1 and B1. I mean I can't reach to f0 and g0.

I upload that file. these are codes that i typed. could you please help me how can I reach to them(f0 & g0)?

http://www.filehosting.org/file/details/573095/Maple%20Project+.mw

Hi all,

Using the Physics package, I have defined a density operator, shown in the image below:

Definition of Density Operator

(I did assume(s ≠i), assume(v≠h).

I then operate on it with the Bracket as shown in the next image:

Bracket on Density Operator

 

I think this should evaluate to (|Y,s,h><Y,s,h|)/2; or at least that's the result I want. However, Maple evaluates this to zero.

Is there a where to convince Maple to evaluate this to what I want/expect?

Thanks in advance,

Kevin

I don't know the use to me of having PDF exports having animations requiring huge emails since I don't own website. Yet, I've been fooling with Apple textbook maker app that has movie imort to PDFs. Someday, I'll use google drive links...

So, action item, maybe Maple would like to have a worksheet drop in to this apple textbook app Like movies. I hope it's easy from Apple taunting html5.

Hi,

 

I am trying to solve a simple system of the form AX=0, where A is a N*N matrix, X is an N*1 vector (and the right-hand side of the equation is an N*1 vector of zeros, I apologize for the inexact notation). The difficulty comes from the fact that the values of A are parameterized by 2*N parameters (that I will write as the 2*N vector P), and I would like to get a solution in the form X=f(P).

 

One solution is to try to use LinearAlgebra[LinearSolve], but it only returns the trivial solution X=0, which I am not interested in.

Another solution is to compute analytically the Moore-Penrose pseudoinverse Ag of A, as the general solution is of the form

(I - Ag A)f ;

where f is a vector of free parameters. However, even for a small matrix size (N=4), Maple is still computing after 3 hours on my (fairly powerful) machine, and it is taking more and more memory over time. As the results are polynomial/rational equations in the parameters P, I was actually expecting Maple to be more powerful than other softwares, but for this particular problem, Matlab's symbolic toolbox (muPAD) gives quick solutions until N=6. I need, in the end, to solve additional polynomial/rational equations that are derived from the solutions X=f(P), where Matlab fails. This is why I would really like to be able to solve the above-mentioned problem AX=0 with Maple in order to try to solve the subsequent step of the problem (polynomial system) with Maple.

 

Any suggestions on how to do this would be highly appreciated! Thank you very much for your time and help.

 

Laureline

I would prefer that all the polynomials generated in my workbook by MAPLE were in expanded form.  For instance, it the elements of a matrix are polynomials, I want to see the expanded form for all of them.  What do I type into a workbook to make this happen.  (I am a new user of MAPLE.) 

When I print 2 matrix it always try to multiply them. How to force just to show?

Hi, i am trying to solve my PDEs with HPM method ,but i get strange errors.

first one is :Error, (in trig/reduce/reduce) Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc,

but when i run my last function again,the error chages,let me show you.


restart;
lambda:=0.5;K[r]:=0.5;Sc:=0.5;Nb:=0.1;Nt:=0.1;Pr:=10;
                              0.5
                              0.5
                              0.5
                              0.1
                              0.1
                               10
> EQUATIONS;


equ1:=diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta)=0;

equ2:=diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta)=0;

equ3:=diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2=0;

equ4:=diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb)=0;
/  d   /  d   /  d   /  d         \\\\     //  d         \ /  d  
|----- |----- |----- |----- f(eta)|||| - R ||----- f(eta)| |-----
\ deta \ deta \ deta \ deta       ////     \\ deta       / \ deta

   /  d         \\          /  d   /  d         \\\
   |----- f(eta)|| - f(eta) |----- |----- f(eta)|||
   \ deta       //          \ deta \ deta       ///

         /  d         \    
   - 1.0 |----- g(eta)| = 0
         \ deta       /    
     /  d   /  d         \\
     |----- |----- g(eta)||
     \ deta \ deta       //

            //  d         \                 /  d         \\
        - R ||----- f(eta)| g(eta) - f(eta) |----- g(eta)||
            \\ deta       /                 \ deta       //

              /  d         \    
        + 1.0 |----- f(eta)| = 0
              \ deta       /    
  /  d   /  d             \\               /  d             \
  |----- |----- theta(eta)|| + 10 R f(eta) |----- theta(eta)|
  \ deta \ deta           //               \ deta           /

           /  d           \ /  d             \
     + 0.1 |----- phi(eta)| |----- theta(eta)|
           \ deta         / \ deta           /

                             2    
           /  d             \     
     + 0.1 |----- theta(eta)|  = 0
           \ deta           /     
    /  d   /  d           \\                /  d           \
    |----- |----- phi(eta)|| + 0.5 R f(eta) |----- phi(eta)|
    \ deta \ deta         //                \ deta         /

                     /  d   /  d             \\    
       + 1.000000000 |----- |----- theta(eta)|| = 0
                     \ deta \ deta           //    
> BOUNDARY*CONDITIONS;


ics:=
f(0)=0,D(f)(0)=1,g(0)=0,theta(0)=1,phi(0)=1;
f(1)=lambda,D(f)(1)=0,g(1)=0,theta(1)=0,phi(1)=0;
   f(0) = 0, D(f)(0) = 1, g(0) = 0, theta(0) = 1, phi(0) = 1
  f(1) = 0.5, D(f)(1) = 0, g(1) = 0, theta(1) = 0, phi(1) = 0
> HPMs;


hpm1:=(1-p)*(diff(f(eta),eta$4)-2*K[r]*diff(g(eta),eta))+p*(diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta))=0;

hpm2:=(1-p)*(diff(g(eta),eta$2)+2*K[r]*diff(f(eta),eta))+p*(diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta))=0;

hpm3:=(1-p)*(diff(theta(eta),eta$2))+p*(diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2)=0;

hpm4:=(1-p)*(diff(phi(eta),eta$2)+diff(theta(eta),eta$2)*(Nt/Nb))+p*(diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb))=0;

        //  d   /  d   /  d   /  d         \\\\
(1 - p) ||----- |----- |----- |----- f(eta)||||
        \\ deta \ deta \ deta \ deta       ////

         /  d         \\     //  d   /  d   /  d   /  d         \
   - 1.0 |----- g(eta)|| + p ||----- |----- |----- |----- f(eta)|
         \ deta       //     \\ deta \ deta \ deta \ deta       /

  \\\     //  d         \ /  d   /  d         \\
  ||| - R ||----- f(eta)| |----- |----- f(eta)||
  ///     \\ deta       / \ deta \ deta       //

            /  d   /  d         \\\       /  d         \\    
   - f(eta) |----- |----- f(eta)||| - 1.0 |----- g(eta)|| = 0
            \ deta \ deta       ///       \ deta       //    
        //  d   /  d         \\       /  d         \\     //  d  
(1 - p) ||----- |----- g(eta)|| + 1.0 |----- f(eta)|| + p ||-----
        \\ deta \ deta       //       \ deta       //     \\ deta

   /  d         \\
   |----- g(eta)||
   \ deta       //

       //  d         \                 /  d         \\
   - R ||----- f(eta)| g(eta) - f(eta) |----- g(eta)||
       \\ deta       /                 \ deta       //

         /  d         \\    
   + 1.0 |----- f(eta)|| = 0
         \ deta       //    
                                       /                         
        /  d   /  d             \\     |/  d   /  d             \
(1 - p) |----- |----- theta(eta)|| + p ||----- |----- theta(eta)|
        \ deta \ deta           //     \\ deta \ deta           /

  \               /  d             \
  | + 10 R f(eta) |----- theta(eta)|
  /               \ deta           /

         /  d           \ /  d             \
   + 0.1 |----- phi(eta)| |----- theta(eta)|
         \ deta         / \ deta           /

                           2\    
         /  d             \ |    
   + 0.1 |----- theta(eta)| | = 0
         \ deta           / /    
        //  d   /  d           \\
(1 - p) ||----- |----- phi(eta)||
        \\ deta \ deta         //

                 /  d   /  d             \\\     //  d   /  d   
   + 1.000000000 |----- |----- theta(eta)||| + p ||----- |-----
                 \ deta \ deta           ///     \\ deta \ deta

          \\                /  d           \
  phi(eta)|| + 0.5 R f(eta) |----- phi(eta)|
          //                \ deta         /

                 /  d   /  d             \\\    
   + 1.000000000 |----- |----- theta(eta)||| = 0
                 \ deta \ deta           ///    
f(eta)=sum(f[i](eta)*p^i,i=0..1);
                f(eta) = f[0](eta) + f[1](eta) p
g(eta)=sum(g[i](eta)*p^i,i=0..1);
                g(eta) = g[0](eta) + g[1](eta) p
theta(eta)=sum(theta[i](eta)*p^i,i=0..1);
          theta(eta) = theta[0](eta) + theta[1](eta) p
phi(eta)=sum(phi[i](eta)*p^i,i=0..1);
             phi(eta) = phi[0](eta) + phi[1](eta) p
> FORequ1;


A:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm1)),p);
/      /  d            \ /  d   /  d            \\
|-1. R |----- f[1](eta)| |----- |----- f[1](eta)||
\      \ deta          / \ deta \ deta          //

                 /  d   /  d            \\\  3   /
   + R f[1](eta) |----- |----- f[1](eta)||| p  + |
                 \ deta \ deta          ///      \
      /  d            \ /  d   /  d            \\
-1. R |----- f[0](eta)| |----- |----- f[1](eta)||
      \ deta          / \ deta \ deta          //

          /  d            \ /  d   /  d            \\
   - 1. R |----- f[1](eta)| |----- |----- f[0](eta)||
          \ deta          / \ deta \ deta          //

                 /  d   /  d            \\
   + R f[0](eta) |----- |----- f[1](eta)||
                 \ deta \ deta          //

                 /  d   /  d            \\\  2   //  d   /  d   /
   + R f[1](eta) |----- |----- f[0](eta)||| p  + ||----- |----- |
                 \ deta \ deta          ///      \\ deta \ deta \

    d   /  d            \\\\       /  d            \
  ----- |----- f[1](eta)|||| - 1.0 |----- g[1](eta)|
   deta \ deta          ////       \ deta          /

          /  d            \ /  d   /  d            \\
   - 1. R |----- f[0](eta)| |----- |----- f[0](eta)||
          \ deta          / \ deta \ deta          //

                 /  d   /  d            \\\  
   + R f[0](eta) |----- |----- f[0](eta)||| p
                 \ deta \ deta          ///  

     /  d   /  d   /  d   /  d            \\\\
   + |----- |----- |----- |----- f[0](eta)||||
     \ deta \ deta \ deta \ deta          ////

         /  d            \    
   - 1.0 |----- g[0](eta)| = 0
         \ deta          /    
A1:=diff(f[0](eta),eta$4)-2*K[r]*(diff(g[0](eta),eta))=0;
A2:=diff(f[1](eta),eta$4)-2*K[r]*(diff(g[1](eta),eta))-R*(diff(f[0](eta),eta))*(diff(f[0](eta),eta$2))+R*f[0](eta)*(diff(f[0](eta),eta$2))=0;
/  d   /  d   /  d   /  d            \\\\       /  d            \   
|----- |----- |----- |----- f[0](eta)|||| - 1.0 |----- g[0](eta)| =
\ deta \ deta \ deta \ deta          ////       \ deta          /   

  0
/  d   /  d   /  d   /  d            \\\\       /  d            \
|----- |----- |----- |----- f[1](eta)|||| - 1.0 |----- g[1](eta)|
\ deta \ deta \ deta \ deta          ////       \ deta          /

       /  d            \ /  d   /  d            \\
   - R |----- f[0](eta)| |----- |----- f[0](eta)||
       \ deta          / \ deta \ deta          //

                 /  d   /  d            \\    
   + R f[0](eta) |----- |----- f[0](eta)|| = 0
                 \ deta \ deta          //    
icsA1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsA2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;
   f[0](0) = 0, D(f[0])(0) = 1, g[0](0) = 0, f[0](1) = 0.5,

     D(f[0])(1) = 0, g[0](1) = 0
    f[1](0) = 0, D(f[1])(0) = 0, g[1](0) = 0, f[1](1) = 0,

      D(f[1])(1) = 0, g[1](1) = 0
>
FORequ2;


B:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm2)),p);
/      /  d            \          
|-1. R |----- f[1](eta)| g[1](eta)
\      \ deta          /          

                 /  d            \\  3   /
   + R f[1](eta) |----- g[1](eta)|| p  + |
                 \ deta          //      \
      /  d            \          
-1. R |----- f[0](eta)| g[1](eta)
      \ deta          /          

          /  d            \          
   - 1. R |----- f[1](eta)| g[0](eta)
          \ deta          /          

                 /  d            \
   + R f[0](eta) |----- g[1](eta)|
                 \ deta          /

                 /  d            \\  2   //  d   /  d            
   + R f[1](eta) |----- g[0](eta)|| p  + ||----- |----- g[1](eta)
                 \ deta          //      \\ deta \ deta          

  \\       /  d            \        /  d            \          
  || + 1.0 |----- f[1](eta)| - 1. R |----- f[0](eta)| g[0](eta)
  //       \ deta          /        \ deta          /          

                 /  d            \\     /  d   /  d            \\
   + R f[0](eta) |----- g[0](eta)|| p + |----- |----- g[0](eta)||
                 \ deta          //     \ deta \ deta          //

         /  d            \    
   + 1.0 |----- f[0](eta)| = 0
         \ deta          /    
B1:=diff(g[0](eta),eta$2)+2*K[r]*(diff(f[0](eta),eta))=0;
B2:=diff(g[1](eta),eta$2)+2*K[r]*(diff(f[1](eta),eta))-R*(diff(f[0](eta),eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta),eta))=0;
     /  d   /  d            \\       /  d            \    
     |----- |----- g[0](eta)|| + 1.0 |----- f[0](eta)| = 0
     \ deta \ deta          //       \ deta          /    
       /  d   /  d            \\       /  d            \
       |----- |----- g[1](eta)|| + 1.0 |----- f[1](eta)|
       \ deta \ deta          //       \ deta          /

              /  d            \          
          - R |----- f[0](eta)| g[0](eta)
              \ deta          /          

                        /  d            \    
          + R f[0](eta) |----- g[0](eta)| = 0
                        \ deta          /    
icsB1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsB2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;
   f[0](0) = 0, D(f[0])(0) = 1, g[0](0) = 0, f[0](1) = 0.5,

     D(f[0])(1) = 0, g[0](1) = 0
    f[1](0) = 0, D(f[1])(0) = 0, g[1](0) = 0, f[1](1) = 0,

      D(f[1])(1) = 0, g[1](1) = 0
> FORequ3;


C:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm3)),p);
 /                                     
 |                /  d                \
 |10. R f[1](eta) |----- theta[1](eta)|
 \                \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[1](eta)| |----- theta[1](eta)|
          \ deta            / \ deta              /

                               2\                              
          /  d                \ |  3   /                /  d   
    + 0.1 |----- theta[1](eta)| | p  + |10. R f[0](eta) |-----
          \ deta              / /      \                \ deta

                \                   /  d                \
   theta[1](eta)| + 10. R f[1](eta) |----- theta[0](eta)|
                /                   \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[0](eta)| |----- theta[1](eta)|
          \ deta            / \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[1](eta)| |----- theta[0](eta)|
          \ deta            / \ deta              /

                                                            /
          /  d                \ /  d                \\  2   |/
    + 0.2 |----- theta[0](eta)| |----- theta[1](eta)|| p  + ||
          \ deta              / \ deta              //      \\

     d   /  d                \\
   ----- |----- theta[1](eta)||
    deta \ deta              //

                      /  d                \
    + 10. R f[0](eta) |----- theta[0](eta)|
                      \ deta              /

          /  d              \ /  d                \
    + 0.1 |----- phi[0](eta)| |----- theta[0](eta)|
          \ deta            / \ deta              /

                               2\  
          /  d                \ |  
    + 0.1 |----- theta[0](eta)| | p
          \ deta              / /  

      /  d   /  d                \\    
    + |----- |----- theta[0](eta)|| = 0
      \ deta \ deta              //    
C1:=diff(theta[0](eta),eta$2)=0;
C2:=diff(theta[1](eta), eta, eta)+Pr*R*f[0](eta)*(diff(theta[0](eta), eta))+Nb*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+Nt*(diff(theta[0](eta), eta))^2=0;
                  d   /  d                \    
                ----- |----- theta[0](eta)| = 0
                 deta \ deta              /    
       /  d   /  d                \\
       |----- |----- theta[1](eta)||
       \ deta \ deta              //

                           /  d                \
          + 10 R f[0](eta) |----- theta[0](eta)|
                           \ deta              /

                /  d              \ /  d                \
          + 0.1 |----- phi[0](eta)| |----- theta[0](eta)|
                \ deta            / \ deta              /

                                     2    
                /  d                \     
          + 0.1 |----- theta[0](eta)|  = 0
                \ deta              /     
icsC1:=theta[0](0)=1,theta[0](1)=0;
icsC2:=theta[1](0)=0,theta[1](1)=0,phi[0](0)=0,phi[0](1)=0;
                theta[0](0) = 1, theta[0](1) = 0
 theta[1](0) = 0, theta[1](1) = 0, phi[0](0) = 0, phi[0](1) = 0
> FORequ4;


E:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm4)),p);
                 3 /  d              \   /                /  d   
0.5 R f[1](eta) p  |----- phi[1](eta)| + |0.5 R f[0](eta) |-----
                   \ deta            /   \                \ deta

             \                   /  d              \\  2   //
  phi[1](eta)| + 0.5 R f[1](eta) |----- phi[0](eta)|| p  + ||
             /                   \ deta            //      \\

    d   /  d              \\
  ----- |----- phi[1](eta)||
   deta \ deta            //

                 /  d   /  d                \\
   + 1.000000000 |----- |----- theta[1](eta)||
                 \ deta \ deta              //

                     /  d              \\  
   + 0.5 R f[0](eta) |----- phi[0](eta)|| p
                     \ deta            //  

     /  d   /  d              \\
   + |----- |----- phi[0](eta)||
     \ deta \ deta            //

                 /  d   /  d                \\    
   + 1.000000000 |----- |----- theta[0](eta)|| = 0
                 \ deta \ deta              //    
E1:=diff(phi[0](eta),eta$2)+Nt*(diff(theta[0](eta),eta$2))/Nb=0;
E2:=diff(phi[1](eta),eta$2)+Nt*(diff(theta[1](eta),eta$2))/Nb+R*Sc*f[0](eta)*(diff(phi[0](eta),eta))=0;
       /  d   /  d              \\
       |----- |----- phi[0](eta)||
       \ deta \ deta            //

                        /  d   /  d                \\    
          + 1.000000000 |----- |----- theta[0](eta)|| = 0
                        \ deta \ deta              //    
         /  d   /  d              \\
         |----- |----- phi[1](eta)||
         \ deta \ deta            //

                          /  d   /  d                \\
            + 1.000000000 |----- |----- theta[1](eta)||
                          \ deta \ deta              //

                              /  d              \    
            + 0.5 R f[0](eta) |----- phi[0](eta)| = 0
                              \ deta            /    
icsE1:=theta[0](0)=1,theta[0](1)=0,phi[0](0)=1,phi[0](1)=0;
icsE2:=theta[1](0)=0,theta[1](1)=0,phi[1](0)=0,phi[1](1)=0;
 theta[0](0) = 1, theta[0](1) = 0, phi[0](0) = 1, phi[0](1) = 0
 theta[1](0) = 0, theta[1](1) = 0, phi[1](0) = 0, phi[1](1) = 0
       
theta[0](eta) = -(152675527/100000000)*eta+1;
                                152675527        
              theta[0](eta) = - --------- eta + 1
                                100000000        
U:=f[1](eta)=0;
                         f[1](eta) = 0
Dsolve(A1,B1,icsA1,icsB1);
                  Dsolve(A1, B1, icsA1, icsB1)


sys:={ diff(g[0](eta), eta, eta)+1.0*(diff(f[0](eta), eta)) = 0, diff(f[0](eta), eta, eta, eta, eta)-1.0*(diff(g[0](eta), eta)) = 0};
    //  d   /  d   /  d   /  d            \\\\
   { |----- |----- |----- |----- f[0](eta)||||
    \\ deta \ deta \ deta \ deta          ////

            /  d            \      
      - 1.0 |----- g[0](eta)| = 0,
            \ deta          /      

     /  d   /  d            \\       /  d            \    \
     |----- |----- g[0](eta)|| + 1.0 |----- f[0](eta)| = 0 }
     \ deta \ deta          //       \ deta          /    /
IC_1:={ f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0,f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0};
    {f[0](0) = 0, f[0](1) = 0.5, g[0](0) = 0, g[0](1) = 0,

      D(f[0])(0) = 1, D(f[0])(1) = 0}
ans1 := combine(dsolve(sys union IC_1,{f[0](eta),g[0](eta)}),trig);
Error, (in dsolve) expecting an ODE or a set or list of ODEs. Received `union`(IC_1, sys)
>
 

using worksheet mode, is there a way to automatically color any comments after (#) with a different color than the default red?

I have been using Maple for years and did not need to significantly document or comment on my worksheets before because I only needed to share my worksheets with close collegues who have a lot of experience with Maple too. However, now I need to share my code with a general audience that might not be a Maple user. So I need to add enough comments after each line, and I have been manually changing the color of comments after the # to green to give the reader the indication that this is a comment and not part of the code, like this for example:

 

restart;

f:=(x,y)->sin(sqrt(x^2+y^2))/sqrt(x^2+y^2); # Define f as a function of the variables x and y

proc (x, y) options operator, arrow; sin(sqrt(x^2+y^2))/sqrt(x^2+y^2) end proc

(1)

df:=(x,y)->eval(diff(f(a,y),a),a=x); # Define df as the partial derivative of f with respect to x

proc (x, y) options operator, arrow; eval(diff(f(a, y), a), a = x) end proc

(2)

df(1,3); # Evaluate df at x=1, y=3

(1/10)*cos(10^(1/2))-(1/100)*sin(10^(1/2))*10^(1/2)

(3)

 

 

Download Worksheet-coloring-comments.mw



It would be great if Maple can automatically color comments like typical editors do. Is this possible? if not, does anyone have an advice for a nice easy way to add proper documentation to worksheets?

 

For many years I succesfully used the command:

Lambda := ImportMatrix(LambdaFile, delimiter = "", datatype = string);

 

but for some txt files I now got the following error in Maple 2016:
Error, (in ImportMatrix) cannot interpret file

The same code still runs without problems at all in previous versions of Maple.

The strange thing is that other txt files can be still be imported in Maple 2016 without problems.

I will upload two files:

ULSlx3.txt returns an error message

ULStd3.txt no problems

ULSlx3.txt

ULStd3.txt

complete code:

restart;
with(LinearAlgebra); with(Statistics);
interface(rtablesize = infinity);
with(Typesetting):
interface(typesetting=extended):

LambdaFile := "C:/path/ULSlx3.txt";
Lambda := Matrix(5, 1);

in the whatsnew there is no information on changes with respect to the ImportMatrix command, although there is some (unrelated) information on Importing Data:

Importing Data
By default, the Import command now returns a DataFrame when importing from Excel, CSV, DIF, and TSV file formats, and returns a DataSeries when importing from ODS, SXC, and TSV file formats. Use the output option to specify a different format. For example, Import(origin, output=Matrix).

 

I have no clue what is wrong with my code and why some text files can be imported as before whereas other files returns an error message.

greetings Harry

In using Maple there are many ways to complete a command on a function. Using shortcuts in the worksheet/document you can enter the command on the line rather than using the drop down menus or clickable math menu.  I would like to see what the shortcut command are for the packages in Maple.  There are so many, I am using the LinearAlgebra package and have seen Dr. Lopez use " ||A||2 to determine the Euclidean Norm of A.  But where does this use get described in the help or examples of other shortcut usage for Maple. I've seen the shortcut commands for Documents in General, but the use of shortcut commands for other packages  don't seem to discuss the usage of such shortcuts.

Is there a document that documents these shortcuts.

 

I am curious, can simplify/siderels be executed in mod p by some equivalent Maple function call?

 

With the following equation

eqn:=y=1/2+(1/2)*erf((1/2)*sqrt(2)*(x-mu)/sigma)-exp(-lambda*(x-mu)+(1/2)*lambda^2*sigma^2+ln(1/2-(1/2)*erf((1/2)*sqrt(2)*(lambda^2*sigma^2-lambda*(x-mu))/(lambda*sigma))));

and with

x:=solve(eqn,x) assuming sigma > 0, lambda > 0;

I got the following solution

x := -(1/2)*(-lambda^2*sigma^2-2*lambda*mu+2*RootOf(-exp(_Z)*erf((1/4)*sqrt(2)*(lambda^2*sigma^2+2*_Z)/(lambda*sigma))+exp(_Z)+erf((1/4)*sqrt(2)*(-lambda^2*sigma^2+2*_Z)/(lambda*sigma))+2*y-1))/lambda;

In order to get rid of RootOf I gave the command:

allvalues(%);

However, RootOf did not disappear. How should I proceed? 

 

hi

if possible to convert matlab file in to maple fie program??convert_to_maple_program.txt

thanks

 

First 142 143 144 145 146 147 148 Last Page 144 of 2097