Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

8/24/19. Updated question the bottom

I need to find if expression has  a "-" in front of it or not.  This is for formatting purposes for something I am doing, that is all. 

I was using the command sign() for this, and it seems to work OK, but sometimes a Maple error is generated or not leading term sign is returned.

The sign function computes the sign of the leading coefficient of expr.

Is there a better and more robust way to do this other than using sign() or Am I using sign wrong?

restart;

expr:=-sin(x)/ln(y)+1;
op(expr);

-sin(x)/ln(y)+1

-sin(x)/ln(y), 1

#why this gives 1 as sign for the above?
sign(expr);

1

#workaround?
sign(op(1,expr))

-1

expr:=sin(x)/ln(y)+1;
sign(expr);

sin(x)/ln(y)+1

1

expr:=-x;
sign(expr);

-x

-1

expr:=-LambertW(exp(p))+1;
sign(expr)

-LambertW(exp(p))+1

-1

expr:=-LambertW(exp(p))/(1+LambertW(exp(p)))+1;
sign(expr)

-LambertW(exp(p))/(1+LambertW(exp(p)))+1

Error, invalid argument for sign, lcoeff or tcoeff

#it seems the following is a work around for the above case
#but why it is needed just here?
sign(op(1,expr))

-1

 

 

Download q1.mw

UPDATE

Thanks to comment below about using frontend. I never used this before except for now. It seems a very useful command and I think I will be using it a lot more from now on.

Just to clarify again what I want. I am just looking to see if there is a leading negative sign in front of an expression. I am not looking to find if the expression itself can be postive or negative when evaluated or anything more subtle or deep than that.

I simply want to check if there is literally a "-" in front of the maple expression. That is all.

Only issue left, is why Maple still gives Error, invalid argument for sign, lcoeff or tcoeff for the last example below? Here is the updated worksheet.

restart;

expr:=-sin(x)/ln(y)+1;
frontend(sign,[expr]);

-sin(x)/ln(y)+1

-1

expr:=sin(x)/ln(y)+1;
frontend(sign,[expr]);

sin(x)/ln(y)+1

1

expr:=-x;
frontend(sign,[expr]);

-x

-1

expr:=-LambertW(exp(p))+1;
frontend(print,[expr]);
frontend(sign,[expr]);

-LambertW(exp(p))+1

-O+1

-1

expr:=-LambertW(exp(p))/(1+LambertW(exp(p)))+1 ;
frontend(print,[expr]);
frontend(sign,[expr]);

-LambertW(exp(p))/(1+LambertW(exp(p)))+1

-O/(1+O)+1

Error, invalid argument for sign, lcoeff or tcoeff

 

 

Download q1_2.mw

Just a basic question, wanted to be clear.  When odeavisor returns a list of types (or classifications) of an ODE. This must mean the ODE can be of any one of these types?

For example, this ODE below, it says it is either homogeneous or rational or Abel or dAlembert.

I am asking because it can be much easier to solve an ODE if one knows if it is of one type vs. the other.

For example, for this one below, it is little easier to solve it if one sees it is Abel instead of dAelmbert. 

The hard part is knowing what type of ODE one is trying to solve and so it is important to pick the right/easier type to use.

Which brings another question: When Maple is given an ODE to solve, and it can be of number of types, how does it select which type to use to solve the ODE? Since the method to solve the ODE depends on the type of the ODE. (At least, when solving it by hand it does make a big difference).

Is there any detailed document that explains more how odeadvisor determines the type of the ODE? This is a very powerful and a useful command but I can't find in help any hints on how it determines the type of ODE.

It must use some general method/algorithm to approach this problem instead of trying to match each different ODE type one by one. right?  I tried to trace the code in the debugger, but I do not fully understand the code flow.

restart;

Typesetting:-Settings(typesetprime=true):

ode:=x^2*(4*x-3*y(x))*diff(y(x),x) = (6*x^2-3*x*y(x)+2*y(x)^2)*y(x)

x^2*(4*x-3*y(x))*(diff(y(x), x)) = (6*x^2-3*x*y(x)+2*y(x)^2)*y(x)

DEtools:-odeadvisor(ode)

[[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class C`], _dAlembert]

DEtools:-odeadvisor(ode,['dAlembert']);
DEtools:-odeadvisor(ode,['Abel']);
DEtools:-odeadvisor(ode,['homogeneous']);

[_dAlembert]

[[_Abel, `2nd type`, `class C`]]

[[_homogeneous, `class A`]]

new_ode := diff(y(x),x)=convert(solve(ode,diff(y(x),x)),parfrac); # y'= the following below. So it is Abel indeed

diff(y(x), x) = -50/27-(2/3)*y(x)^2/x^2+(1/9)*y(x)/x-(200/27)*x/(-4*x+3*y(x))

#But to solve it as dAlembert, one need to rewrite it as y=x*g(y')+f(y') and it gets messy
#becuase one has to solve for y(x) first, and this will generate more than one ODE
ode:=convert(ode,D);
map(z-> y(x)=convert(z,diff),[solve(ode,y(x))])

x^2*(4*x-3*y(x))*(D(y))(x) = (6*x^2-3*x*y(x)+2*y(x)^2)*y(x)

[y(x) = ((1/2)*(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)-2*((1/2)*(diff(y(x), x))+3/4)/(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+1/2)*x, y(x) = (-(1/4)*(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+((1/2)*(diff(y(x), x))+3/4)/(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+1/2+((1/2)*I)*3^(1/2)*((1/2)*(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+2*((1/2)*(diff(y(x), x))+3/4)/(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)))*x, y(x) = (-(1/4)*(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+((1/2)*(diff(y(x), x))+3/4)/(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+1/2-((1/2)*I)*3^(1/2)*((1/2)*(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)+2*((1/2)*(diff(y(x), x))+3/4)/(5*(diff(y(x), x))-5+(8*(diff(y(x), x))^3+61*(diff(y(x), x))^2+4*(diff(y(x), x))+52)^(1/2))^(1/3)))*x]

 

 

Download q1.mw

 

 

 

Hi,

I have a simple expression  g1:=x^2+x;

Then its derivative D1:=diff(g1,x); which is 2x+1

Then I want to make a function with this derivative f1:=x->D1;

And I want to evalute this function at any point, for instance f1(3)

And what I get for f1(3) is the the derivative 2x+1 and not the value 7 as I would expect.

What am I missig?

Hey there.

I'm trying to fill out the entries of a matrix. Each matrix element is the result of a very complicated calculation. Currently, I am using nested do loops (two loops total) to scan through each row and column respectively. I find that this process racks up a ton of memory, and that I often run out of memory before the matrix has been completely specified (depending on how big a matrix I want).

First, why is this happening? And second, what is a smarter way to perform the calculation? I will attatch my code below.

Cheers!

MaplePrimes2MuchMemory.mw

I realise this is probably a really obvious question...

I have this function:

(2^(1/3)*Pi*AiryAi(x))/(b*(a*AiryAi(x) + b*AiryBi(x)))

And I want to approximate it near to the root of the equation

a*AiryAi(x) + b*AiryBi(x)=0 (say the solution is x=x0)

The first term - I know - is a term for 1/(x-x0) for which the coefficient is

AiryAi(RootOf(AiryAi(_Z)*a + b*AiryBi(_Z)))*2^(1/3)*Pi/(b*a*AiryAi(1, RootOf(AiryAi(_Z)*a + b*AiryBi(_Z))) + b^2*AiryBi(1, RootOf(AiryAi(_Z)*a + b*AiryBi(_Z)))).

However the next term, which should be a constant, comes out as a really large term which I can't make sense of (I've included it at the bottom of this post but it is very large).

Am I doing something wrong? Because I feel that this should be easier than I'm making it.

 

The determined expansion was:


    (1/3)                                       2
-3 2      Pi RootOf(AiryAi(_Z) a + b AiryBi(_Z))  

                                             3               
  AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryAi(RootOf(

                                 3      (1/3)    
  AiryAi(_Z) a + b AiryBi(_Z))) b  - 9 2      Pi

                                     2
  RootOf(AiryAi(_Z) a + b AiryBi(_Z))  

                                             2
  AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

                                             2    2      (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a b  - 9 2      Pi

                                     2                           
  RootOf(AiryAi(_Z) a + b AiryBi(_Z))  AiryBi(RootOf(AiryAi(_Z) a

                                                               3
   + b AiryBi(_Z))) AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

   2        (1/3)                                       2
  a  b - 3 2      Pi RootOf(AiryAi(_Z) a + b AiryBi(_Z))  

                                             4  3      (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  - 4 2      Pi

  RootOf(AiryAi(_Z) a + b AiryBi(_Z)) AiryBi(RootOf(AiryAi(_Z) a

   + b AiryBi(_Z)))

                                                2               
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryAi(RootOf(

                                 3      (1/3)                       
  AiryAi(_Z) a + b AiryBi(_Z))) b  - 8 2      Pi RootOf(AiryAi(_Z) a

   + b AiryBi(_Z)) AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(RootOf(AiryAi(_Z) a

                       2      (1/3)                       
   + b AiryBi(_Z))) a b  - 4 2      Pi RootOf(AiryAi(_Z) a

   + b AiryBi(_Z)) AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                                2               
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryAi(RootOf(

                                 2        (1/3)                  
  AiryAi(_Z) a + b AiryBi(_Z))) a  b - 4 2      Pi RootOf(AiryAi(

  _Z) a + b AiryBi(_Z))

                                                2
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

                                             2    2      (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a b  - 8 2      Pi

  RootOf(AiryAi(_Z) a + b AiryBi(_Z)) AiryBi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                             2  2        (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b - 4 2      Pi

  RootOf(AiryAi(_Z) a + b AiryBi(_Z))

                                                2
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

                                             2  3      (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  + 2 2      Pi

                                             2           
  AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryBi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(RootOf(AiryAi(_Z) a

                     3      (1/3)    
   + b AiryBi(_Z))) b  + 2 2      Pi

                                             2           
  AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryAi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(RootOf(AiryAi(_Z) a

                       2      (1/3)                              
   + b AiryBi(_Z))) a b  + 4 2      Pi AiryBi(RootOf(AiryAi(_Z) a

   + b AiryBi(_Z))) AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                             2    2      (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a b  + 4 2      Pi

  AiryBi(RootOf(AiryAi(_Z) a + b AiryBi(_Z))) AiryAi(1,

  RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                             2  2         (1/3)    
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b + 12 2      Pi

                                                3           
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryAi(1,

                                        3       (1/3)    
  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) b  + 36 2      Pi

                                                2
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

                                                2    2      
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a b  + 36

   (1/3)                                                   
  2      Pi AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                                3  2        (1/3)    
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b + 2 2      Pi

  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                             3  2  
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b

         (1/3)                                                  4
   + 12 2      Pi AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

   3      (1/3)                                                   
  a  + 2 2      Pi AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                             3  3\//   
  AiryAi(RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a / \12

                                                4  4        
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b + 48

                                                3           
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  AiryBi(1,

                                        3  2      
  RootOf(AiryAi(_Z) a + b AiryBi(_Z))) a  b  + 72

                                                2
  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  

                                                2  2  3      
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a  b  + 48

  AiryAi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))

                                                3    4
  AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  a b

                                                      4  5\
   + 12 AiryBi(1, RootOf(AiryAi(_Z) a + b AiryBi(_Z)))  b /

 

So I have two differently parametrised plots:

p1 := plot([2^(1/3)*Pi*AiryAi(x)/(Q*(P*AiryAi(x) + Q*AiryBi(x))), -2*(-0.0008397983056*2^(1/6)*AiryAi(1, x) + 0.004845212367*2^(1/6)*AiryBi(1, x))/((-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x))^3*(648.3911162*2^(1/6)*AiryAi(1, x)/(-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x)) - 648.3911162*2^(1/6)*AiryAi(x)*(-0.0008397983056*2^(1/6)*AiryAi(1, x) + 0.004845212367*2^(1/6)*AiryBi(1, x))/(-0.0008397983056*2^(1/6)*AiryAi(x) + 0.004845212367*2^(1/6)*AiryBi(x))^2)), x = -1 .. 5])

and

p2 := plot([(sin(x) - sin(ap))/K, abs(sin(x)/cos(x)), x = 0 .. 2])

 

I would like to show the sum of these two plots. How would I go about doing this?

 

I'm trying to solve the following linear system

eq1 := -t*x + y*z = j;
eq2 := t*x + y*z = -m;
eq3 := t*z - x*y = -b;
eq4 := t*z + x*y = a;

I have made many unsuccessful attempts.

Would anyone have the solution to the problem?

Thanks!

I do not understand why Maple sometimes shows singular solution to Clairaut ODE and sometimes not.

Clairaut ODE has the form y(x) = x y'(x) + G(x, y')

In the following ODE when I ask Maple to dsolve it as is, it does give singular solution. Next, when solving explicity for y(x) first, which will generate 2 ODE's, each is Clairaut ODE, then ask Maple to dsolve each, now Maple no longer gives the singular solution. But when I solve each one of these ODE's, I see that there is the singular solution there. It must be there, since this is Clairaut ODE and it has singular solution.

When I do PDEtools:-casesplit on each of the two ODE's generated by solving for y(x) first, I see the singular solution there.

The question is, why Maple dsolve does not show the singular solution in the second case? And how to make it show it? Or did I do something wrong?

restart;

Typesetting:-Settings(typesetprime=true):

ode:=x^2*diff(y(x),x)^2-(1+2*x*y(x))*diff(y(x),x)+1+y(x)^2 = 0;

x^2*(diff(y(x), x))^2-(1+2*x*y(x))*(diff(y(x), x))+1+y(x)^2 = 0

DEtools:-odeadvisor(ode)

[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

Vector([dsolve(ode,y(x))]); #now it shows singular solution (first one below)

Vector(3, {(1) = y(x) = (1/4)*(4*x^2-1)/x, (2) = y(x) = _C1*x-sqrt(_C1-1), (3) = y(x) = _C1*x+sqrt(_C1-1)})

PDEtools:-casesplit(ode)

`casesplit/ans`([(diff(y(x), x))^2 = (2*y(x)*(diff(y(x), x))*x+diff(y(x), x)-y(x)^2-1)/x^2], [2*(diff(y(x), x))*x^2-2*x*y(x)-1 <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])

ode:=convert(ode,D): #solve for y(x) first, this will generate 2 ODE's
sol:=[solve(ode,y(x))]:
odes:=Vector(map(z->y(x)=z,convert(sol,diff)))

Vector(2, {(1) = y(x) = (diff(y(x), x))*x+sqrt(diff(y(x), x)-1), (2) = y(x) = (diff(y(x), x))*x-sqrt(diff(y(x), x)-1)})

DEtools:-odeadvisor(odes[1]);
DEtools:-odeadvisor(odes[2]);

[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

[[_1st_order, _with_linear_symmetries], _rational, _Clairaut]

dsolve(odes[1],y(x)); #where is singular solution?

y(x) = _C1*x+(_C1-1)^(1/2)

dsolve(odes[2],y(x)); #where is singular solution?

y(x) = _C1*x-(_C1-1)^(1/2)

PDEtools:-casesplit(odes[1])

`casesplit/ans`([diff(y(x), x)-1 = (-(diff(y(x), x)-1)^(1/2)+y(x)-x)/x, diff(y(x), x) = (-(diff(y(x), x)-1)^(1/2)+y(x))/x], [1+2*x*(diff(y(x), x)-1)^(1/2) <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])

PDEtools:-casesplit(odes[2])

`casesplit/ans`([diff(y(x), x)-1 = ((diff(y(x), x)-1)^(1/2)+y(x)-x)/x, diff(y(x), x) = ((diff(y(x), x)-1)^(1/2)+y(x))/x], [2*x*(diff(y(x), x)-1)^(1/2)-1 <> 0]), `casesplit/ans`([y(x) = (1/4)*(4*x^2-1)/x], [])

 

 

Download missing_singular.mw

The commands

with(LinearAlgebra):interface(rtablesize=50);Matrix([[1,1],[4,5]]);

give the output


50
Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 4, (2, 2) = 5}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])

 

Why won't it display properly?

 

To help decide the type of ODE, I need a function which moves all derivatives to lhs and everything else to the rhs of the ODE. This way I can more easily analyze the ODE.

The ode will be only first order. Any term which contains  (y')^n, is to be moved to the lhs. Rest to rhs. Couple of examples will help illustrate the problem. This is done in code only, without looking at the screen. The dependent variable is always y and the independent variable is x.  So I need to turn the ODE to the form 

                    G(y',y'^2,y'^3,.....,y'^n)  = F(x,y)

I can find all derivatives in the ODE using

indets['flat'](ode,{`^`('identical'(diff(y(x),x)),'algebraic'),'identical'(diff(y(x),x))})

But not sure how this will help me do what I want. isolate does not help, since it only takes one term at a time. Collect also did not help for same reason.  If the ODE contains only ONE derivative, then it is easy to do. But the question is about how to do it for ODE which contains more than y' term of different powers as the examples below show.

What methods to do this in Maple? I looked at DEtools but so far did not see anything.

Example 1

 

restart;
ode:=3*diff(y(x),x)^2+diff(y(x),x)^3+sin(x)+y(x)=x*y(x)+x*diff(y(x),x);

3*(diff(y(x), x))^2+(diff(y(x), x))^3+sin(x)+y(x) = x*y(x)+x*(diff(y(x), x))

indets['flat'](ode,{`^`('identical'(diff(y(x),x)),'algebraic'),'identical'(diff(y(x),x))})

{(diff(y(x), x))^2, (diff(y(x), x))^3, diff(y(x), x)}

ode_wanted:= 3*diff(y(x),x)^2+diff(y(x),x)^3-x*diff(y(x),x)=-sin(x)-y(x)+x*y(x)

3*(diff(y(x), x))^2+(diff(y(x), x))^3-x*(diff(y(x), x)) = -sin(x)-y(x)+x*y(x)

Example 2

 

restart;
ode:=3*diff(y(x),x)^2+diff(y(x),x)=x*diff(y(x),x)+5;

3*(diff(y(x), x))^2+diff(y(x), x) = x*(diff(y(x), x))+5

indets['flat'](ode,{`^`('identical'(diff(y(x),x)),'algebraic'),'identical'(diff(y(x),x))})

{(diff(y(x), x))^2, diff(y(x), x)}

ode_wanted:= 3*diff(y(x),x)^2+diff(y(x),x)-x*diff(y(x),x)=5

3*(diff(y(x), x))^2+diff(y(x), x)-x*(diff(y(x), x)) = 5

 

 

Download lhs_rhs.mw

 

Dear Maple users

Some students have come to us to report, that something doesn't seem to work properly in Maple 2019.1 in Document Mode. And they seem to be right: writing an passive math formula by using Shift+F5 (the formula is gray, not blue), then using F5 to get out of that Math field and back into Text Mode. Using the Enter key to go to the next line: It doesn't work! The cursor stays in the same line. This behavior is new in Maple 2019. It worked properly in Maple 2018 and earlier. I assume it is not the intention? 

I know it can easily be dealt with by making a new Paragraph by using the shortcut Ctrl+Shift+J. I call the assumed bug 'severe' though, because it will severely delay the workflow for many students. They are used to deliver a document mixed with formulas (active or passive) and text. 

NB! I have tested it on several computers (Mac and Windows), and it doesn't work on any of them.

Regards,

Erik V.

I've recently changed to maple 2019, from the 2016 version as my license for that product had expired. 
However I find it really frustrating that often upon evaluating an expression I can't convert the units. 

For instance I had a calculation that evaluated to: 

2.114163508*10^7 [kg/s^2]
 

When I try to directly replace the units within maple to instead be [J/m^2] I recieve the following error message: 


"Error, (in  Units:-TestDimensions) 'op(3, i) does not  evaluate to module" 

There is no explanation for this error when I try to look it up. However if I once again manually write the answer: 
2.114163508*10^7 [kg/s^2] and use the replace units function. 
No problem. 
I find this quite annoying and frustrating and I hope you can help.
 

Best regards 

Anders Alexander Wagenblast 

Hello all

I am going to find the diffusion constant in the following equation :

PDE:=diff(C(x,t),t)=d*diff(C(x,t),x,x);

In a way that ,

evalf(Int(C(x,t=specific),x=0..L))/L - m_number(t=specific)=0
 

In other words, It would be an iterative procedure to guess "d" and then find the solution C (something like shooting method). The objective is to find "d" in a way that the average of C (solution of PDE) would be equal to m_number at that specific time.

Also, Since I have 5 specific time and m_number, I will have 5 different d. So, I need to use least square method or other optimization technique find one finalized d value.

I have uploaded my code.

inverse_numerical_diffusion.mw

I am not good at using Proc command and  I think the error of my code is because of that.

Would you help me to find out my problem in the code and any new idea for solviong this equaltion would be greatly appreciated.

Thank you for your kind attentions in advance

Amir

 

 

The integral of y = Dirac(phi-m), in which phi is a continuously variable quantity and m is a positive integer, from -infinity to infinity yields 1 as an answer.   The analogous integral of y2 yields no answer.  Is it possible that the latter integral has some mathematical meaning that might yield an answer?

This is may be a philosophical question. But sometimes Maple suprises me when telling it to "simplify" expression. As in this example.

expr:=1/(y^3+1)^(2/3);

1/(y^3+1)^(2/3)

int(expr,y)

y*hypergeom([1/3, 2/3], [4/3], -y^3)

simplify(%)

(2/9)*y*Pi*3^(1/2)*LegendreP(-1/3, -1/3, (-y^3+1)/(y^3+1))/((-y^3)^(1/6)*(y^3+1)^(1/3)*GAMMA(2/3))

 


For me, the original result is "simpler". (Not only smaller leaf count, but it has one special function, vs. two: Legendre and Gamma). But may be Maple considers hypergeom always more "complex" than any other?

That is why I use simplify(expr,size) because I am scared of simplify without any option, as I have little idea how it decides which is simpler.

Any thoughts from the experts on how Maple decided to simplify something when no option is used? What kinds of rules it uses to decide how to transform the expression?

Maple 2019.1

 

Download simplify.mw

1 2 3 4 5 6 7 Last Page 1 of 10