Thomas Dean

227 Reputation

10 Badges

16 years, 132 days

MaplePrimes Activity

These are questions asked by Thomas Dean

I made a mistake in entering this expression:  2020 should have been 2018.


realloc(): invalid old size

Process Maple aborted (core dumped)

Nothing I can do from the keyboard should cause a core dump.

Looking at #6 in

How do I entter the continued fraction in Maple?  I am using the command line interface (actually Emacs).

I have four equations,

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


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):


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.

## 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
          elif cos(x)<0 and sin(x)<0 then
          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))
        thisproc(n-1, x, thisproc(n, x, y-1))
end proc

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



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