Rouben Rostamian

MaplePrimes Activity


These are questions asked by Rouben Rostamian

restart;

Here are the graphs of a parabola and a straight line:

plots:-display(
        plot(x^2, x=-1..1),
        plot((x+1)/2, x=-1..1),
color=["Red","Green"]);

 

Suppose I want to plot the part of the parabola that lies below

the straight line, and suppose, just to be nasty, I choose to do it

with implicitplot:

plots:-implicitplot(y=x^2, x=-1..1, y=0..(x+1)/2);

 

That is not a parabola at all.  [And where does the "ynew" label come from?]

 

This behavior was introduced in Maple 2022.

In Maple 2021 we get the expected result:

plots:-implicitplot(y=x^2, x=-1..1, y=0..(x+1)/2);


 

Download mw.mw

 

restart;

Let x be some name:

x := asdf;

asdf

I wish to make a new name, y, whose value is the first character in x:

convert(x, string):
y := convert(%[1], name);

a

That works but seems too convoluted.  Is there a better way of doing that?

I have a table indexed as A[i][j,k],  Each entry is an expression involving diff which I want to convert to but convert(A,D) doesn't work. Any suggestions on how to do that?

restart;

for i from 1 to 2 do
  for j from 1 to 2 do
    for k from 1 to 2 do
      A[i][j,k] := diff(u[i](x[1],x[2]), x[j], x[k]);
    end do
  end do;
end do;

A[1][1,1];

diff(diff(u[1](x[1], x[2]), x[1]), x[1])

print(A);

A

 
 

Download convert-table.mw

 

In a homework assignment on differential geometry, a student used Mathematica to calculate the torsion of a trefoil curve.  His result, using identical steps as mine, was significantly simpler than what I had gotten with Maple, although as we see in the attached workseet, they are mathematically equivalent.

Is there a way to coax Maple to reduce its result to something like my student has obtained?

My calculation

T1 := (-192*cos(t)^6 + 288*cos(t)^4 - 912*cos(t)^3 - 108*cos(t)^2 + 684*cos(t) - 54)/(4608*cos(t)^9 - 10368*cos(t)^7 + 6208*cos(t)^6 + 7776*cos(t)^5 - 9312*cos(t)^4 - 2440*cos(t)^3 + 3492*cos(t)^2 + 372*cos(t) - 1169);

(-192*cos(t)^6+288*cos(t)^4-912*cos(t)^3-108*cos(t)^2+684*cos(t)-54)/(4608*cos(t)^9-10368*cos(t)^7+6208*cos(t)^6+7776*cos(t)^5-9312*cos(t)^4-2440*cos(t)^3+3492*cos(t)^2+372*cos(t)-1169)

The student's calculation

T2 := 6*(10+38*cos(3*t)+cos(6*t))/(975+70*cos(3*t)-194*cos(6*t) -18*cos(9*t));

6*(10+38*cos(3*t)+cos(6*t))/(975+70*cos(3*t)-194*cos(6*t)-18*cos(9*t))

simplify(T1 - T2);

0

 

Download torsion2.mw

restart;

Here we have a pretty well-behaved trig function:

y := t -> 144*cos(t)^6 - 216*cos(t)^4 + 32*cos(t)^3 + 81*cos(t)^2 - 24*cos(t) + 17;

proc (t) options operator, arrow; 144*cos(t)^6-216*cos(t)^4+32*cos(t)^3+81*cos(t)^2-24*cos(t)+17 end proc

plot(y(t), t=0..2*Pi, view=0..35);

Maple 2023 plots y^(3/2) with a strange artifact at t = Pi:

plot(y(t)^(3/2), t=0..2*Pi, view=0..200);

Any reason for that?  Maple 2021 and earlier used to produce the correct plot:

  

Download bug-in-plot.mw

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