Gharhoud

15 Reputation

3 Badges

2 years, 148 days

MaplePrimes Activity


These are questions asked by Gharhoud

 I defined the following function L1 and L2 to test, if  Maple is returning the same results. Mathematically they are identical. For all testpoints, L1 returns the correct results (for y := -5 the result is -15).  L2  returns identical results exept for y:=-5. For y:= -5, where you can see on the first glance that the result must be -15,  Maple is returning for L2 a complex number. I am worried about this different treatment of the functions L1 and L2, because I am calculating with functions, where you cannot prove the result as easy as it can be done here. 

L1 := y -> 3*y*((y + 4)^2)^(1/3);
   L1 := proc (y) options operator, arrow, function_assign; 

      3*y*((y+4)^2)^(1/3) end proc

L2 := y -> 3*y*(y + 4)^(2/3);
   L2 := proc (y) options operator, arrow, function_assign; 

      3*y*(y+4)^(2/3) end proc
NULL;
for y from -5 to 0 do
    print("y = ", y, "L1(y)   =  ", L1(1.0*y), "          L2(y)  =,  ", L2(1.0*y));
end do;
  "y =  ", -5, "L1(y)   =  ", -15.0, "          L2(y)  =,  ",     7.500000000 - 12.99038105 I
 "y =  ", -4, "L1(y)   =  ", -0., "          L2(y)  =,  ", -0.
"y =  ", -3, "L1(y)   =  ", -9.0, "          L2(y)  =,  ", -9.0
           "y =  ", -2, "L1(y)   =  ", -9.524406312,              "          L2(y)  =,  ", -9.524406312
           "y =  ", -1, "L1(y)   =  ", -6.240251469,              "          L2(y)  =,  ", -6.240251469
   "y =  ", 0, "L1(y)   =  ", 0., "          L2(y)  =,  ", 0.

Question about using the command „ExtremPoints“

I am using Maple 2019.

Using the command ExtremPoints I got different list when defining the function over a closed intervall piecewise or with f(x), x=a..b.

Maple desciption states:
ExtremePoints(f(x), x = a..b) command returns all extreme points of f(x) in the interval [a,b] as a list of values.

An extreme point is defined as any point which is a local minimum or maximum, which includes any finite end points.

So I expected, Maple returns the same list, independend of how the same function is defined (see example below). Instead: with the piecewise definition Maple returns as extrempoints only the local extrempoints without the finite endpoints.
Defining the same function with f(x),x=a..b Maple returns the list with local minimum or maximum, which includes any finite end points.

Example:

f := x -> piecewise(-1 <= x and x <= 2, x^2, undefined);

Return:  ExtremePoints(f(x));

                              [0] 

g := x -> x^2

ExtremePoints(g(x), x = -1 .. 2);

                           [-1, 0, 2]

Maple Input:
restart; with(RealDomain); log[2](x^2 - 6*x) = 3 + log[2](1 - x); Maple returns as solution
ln\x - 6 x/ ln(1 - x) ------------ = 3 + --------- ln(2) ln(2) "(->)" [[x = 2], [x = -4]]
Is the solution x = 2 correct?

Substituting x=2 into the original Function Maple returns correct: log[2](2^2 - 6*2);

undefined and log[2](1 - 2).; undefined. So x =2 should not be a solution of this function.

Page 1 of 1