Thomas Dean

322 Reputation

10 Badges

19 years, 113 days

MaplePrimes Activity


These are questions asked by Thomas Dean

I have four equations,

y = 1/x, y=3, y=1, x=0

restart;

P1 := plots:-implicitplot(y=1/x, x=-1..2, y=0..4, color=black, scaling=constrained):
P2 := plots:-implicitplot(y=3,   x=-1..2, y=0..4, color=black):
P3 := plots:-implicitplot(y=1,   x=-1..2, y=0..4, color=black):

plots:-display([P1,P2,P3]);

How do I fill the area between the first three equations and the y axis (x=0)?

Is it possible to do this with plottools:-transform?

Heck Example 15.5 must have worked for an old version of maple.

restart;
## plot two functions and color the region between
sine :=   plot(sin(x), x=0..4*Pi, color=black,thickness=3):
s    :=   plot(sin(x), x=0..4*Pi, color=red, filled=true):
cosine := plot(cos(x), x=0..4*Pi, color=black,thickness=3):
c      := plot(cos(x), x=0..4*Pi, color=red, filled=true):
f := x -> if cos(x)>0 and sin(x)>0 then
              min(cos(x),sin(x))
          elif cos(x)<0 and sin(x)<0 then
              max(cos(x),sin(x))
          else 0
          end if;
b := plot(f(x), x=0..4*Pi, filled=true, color=green):

display([sine, cosine, b, s, c]):

Gives the error.

Error, (in f) cannot determine if this expression is true or false: 0 < cos(x)
and 0 < sin(x)

I tried verify(cos(x),0,less_than) and verify(sin(x),0,less_than), etc., but that makes f(x) always return 0.

f := sin(x);
g := cos(x);
plottools:-transform(unapply([x,y+g],x,y))(plot(f-g,x=0 .. 4*Pi,filled=true));
Works, but, I can not remember how that works.

Is it possible to use if in maple 2020.

In a recent question, the solution involved [...]::[list$3].

H:= proc(n, x, y)
    if n=0 then y+1
    elif n=1 and y=0 then x
    elif n=2 and y=0 then 0
    elif y=0 then 1
    elif not [n,x,y]::[nonnegint$3] then 
        'procname'(n-1, x, 'procname'(n, x, y-1))
    else
        thisproc(n-1, x, thisproc(n, x, y-1))
    fi
end proc

Where is  the  form [...]::[list$3] documented?

 

 

How do I convert the expression

y = (sqrt(x) + 10)^(1/3) - (sqrt(x) - 10)^(1/3);

into

y^3 = 20 - 3*(x - 100)^(2/3);

A post on the Maxima mailing list said this was done by cubing both sides.  I can not seem to be able to get there.  A suggestion that the process involved recognizing the product (a+b)*(a-b)

Where can I find a description of the []() syntax?

First 6 7 8 9 10 11 12 Page 8 of 15