Thomas Dean

312 Reputation

10 Badges

20 years, 15 days

MaplePrimes Activity


These are questions asked by Thomas Dean

int(1/(x-1)+sum((k+1)*x^k,k=0..2018)/sum(x^k,k=0..2019),x);

Direct integration produces a large, messy statement, including numbers like 2017, 2016,...,1

Looking at the parts, the numbers 2020, 2019, etc. are in each.

(**) sum((k+1)*x^k,k=0..2018);
x^2019*(2019*x-2020)/(x-1)^2+1/(x-1)^2

(**) sum(x^k,k=0..2019);
x^2020/(x-1)-1/(x-1)

Looks like this should reduct to some simple expession????

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

int(1/(x-1)+sum((k+1)*x^k,k=0..2020)/sum(x^k,k=0..2019),x);

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 http://www.mit.edu/~pax/pdf/qualifying_round_2020_test.pdf

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

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.

5 6 7 8 9 10 11 Last Page 7 of 15