## How do I solve implicit plotting capabilities of ...

Graph the curve with equation y(y2 −1)(y − 2)= x(x −1)(x − 2)
At how many points does the curve have horizontal tangents?

Estimate the x-coordinates of these points.

Find the equations of the tangent lines at the points (0,1) and (0,2)

Find the exact x-coordinates of the points of these points.
Create even more fanciful curves by modifying the equation.

PLEASE WRITE STEP BY STEP IN MAPLE

## Plot an ellipse without boundary...

How to get rid of the boundary

display(ellipse([0, 0], 2, 1, filled=true, color = red),size=[1000,500],axes=none);

or how to make the boundary the same color as the filled region?

## How can I export an animated 3D plot as a GIF to o...

Good day.

When I export an animated 3D (surface contour) plot to a gif format, the image is incomplete (please see attached file).

Can anyone suggest a way to reformulate the expressions so the animated plot can be exported to Powerpoint intact?

## make the curve smooth... How I can change this to smooth curve

## why Maple asks "save large calculations" on this c...

I have not used Array much before. I made an array that has 3 elements, starting index is 0 and last index is 2.

I want each element in the array to be an empty list, so I can later add to it.  (since I do not know in advanced what size of list I need in each slot of the Array).

`Array(0..2,[seq([],i=0..2)])`

And this works in the code I am using. But the strange thing, each time I try to save the worksheet, I get Warning about saving Large calculation.

What large caclulation? The array is empty? Even though the code is working, and I can add to each entry in the array lists OK and been using it OK, I think may be I am not doing something right.

How to correctly creat an Array from 0..N  and initialized each entry to empty list?

Maple 2021.2

## why remove works different on diff(y(x),x) vs. one...

When doing

```item:=x;
res:=remove(has,item,x);
```

Maple returns, as expected But when item is not a single symbol, say sin(x) or diff(y(x),x), then it no longer returns ()

```item:=diff(y(x),x);
res:=remove(has,item,diff(y(x),x));
```

It does not return () but it now returns the input itself, as if it was not removed. Why is that, and how to make it return () also on composite expression?  I tried flatten and inplace option. Otherwise, I will have to do a special test before.

The strange thing is that it works on

```item:=2*diff(y(x),x);
res:=remove(has,item,diff(y(x),x));
```

Now it returns as expected. So now it did remove diff(y(x),x). But it does not remove it when it is on its own. I assume this is by design. But it is not intuitive to the user. One would expect it to work same way on removing `x` or `sin(x)` or `diff(y(x),x)`

## Is it possible to export routines from a personal ...

Is there a way to export routines from a package. The reason I ask, I was answering a question here and I needed two routines I have, that I put together a couple of years ago in a package. I used showstat copied, pasted and edited. Worked, but not great and would utterly fail with anything complicated. e.g. In the two routines pasted  below SignedArea on line 3 c  is c    that caused a minor problem.       ## Can maple solve an ode using asymptotic expansions...

Can Maple solve an ode by asymptotic expansions methods? series methods (power series or Frobenius series) work only on ordinary expansion point or removable singularity point. For non removable singularity (essential), Maple's dsolve with series method can't solve these. Also, if the RHS of the ode is not analytic at the expansion point, series method do not work.

The asympt command only applies to algebraic expressions.

Does Maple have something similar to Mathematica's AsymptoticDSolveValue  ?

Here is an example. This is an ode with RHS not analytic (has no Taylor series) at x=0

```ode:=diff(y(x),x)+y(x)=1/x;
dsolve(ode,y(x),'series',x=0)```

No solution.  While in Mathematica

```ode = y'[x] + y[x] == 1/x
AsymptoticDSolveValue[ode, y[x], {x, 0, 6}]``` Here is another example of ode where the coefficient of y(x) is not analytic at x=0

```ode:=diff(y(x),x)+sqrt(x)*y(x)=0;
dsolve(ode,y(x),'series',x=0)```

No solution. In Mathematica

```ode = y'[x] + Sqrt[x] y[x] == 0
AsymptoticDSolveValue[ode, y[x], {x, 0, 6}]``` Does there exist a package in Maple that can do this? Will this functionality be added in Maple in the future if currently there is no support? ( I searched and could not find anything so far).

One possible workaround I found is to solve the ODE using normal methods (non-series), then apply the asympt command on the solution. But one needs to remove the constant of integration first, Here is the above example done this way

```ode:=diff(y(x),x)+sqrt(x)*y(x)=0;
sol:=dsolve(ode);
Order:=8;
sol:=eval(sol,_C1=1);
asympt(eval(rhs(sol),x=1/y),y);
eval(%,y=1/x)

``` Mutliplying the above back by the constant _C1 gives same answer as Mathematica's.

Is the above how one is supposed to do it in Maple? It worked on the above simple example, but need to see if it will work for other examples. it will be better if this was more directly supported. i.e. if asympt will work directly on ode's (or a new command or a new option to dsolve similar to 'series' but call 'asympt').

## provide way to override variable and method in bas...

Maple Object model is somewhat limited.  One of the main reasons to use OOP is to be able to extend base class, and override methods in base class by new methods if needed.

This is described in  https://en.wikipedia.org/wiki/Method_overriding

Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. It allows for a specific type of polymorphism (subtyping). The implementation in the subclass overrides (replaces) the implementation in the superclass by providing a method that has same name, same parameters or signature, and same return type as the method in the parent class. The version of a method that is executed will be determined by the object that is used to invoke it. If an object of a parent class is used to invoke the method, then the version in the parent class will be executed, but if an object of the subclass is used to invoke the method, then the version in the child class will be executed. Some languages allow a programmer to prevent a method from being overridden. Maple does not allow the extending class to override variables or methods in the base class. Even if the type of the variable or the sigature of the proc is different as long as the name is the same.

This makes it hard to override base class implementation and to do type extension.

Here is a toy example

```restart;

animal:=module()
option object;
export data1;

export move::static:=proc(_self,\$)
print("In Animal class. moving ....");
end proc;
end module;

#create class/module which extends the above
dog:=module()
option object(animal);
export move::static:=proc(_self,\$)
print("In dog class. moving ....");
end proc;
end module;

```

Error, (in dog) export `move` is declared more than onc

All computer languages that supports OOP that I know about supports overriding, The above web page lists some.

A workaround, is if such name conflict occurs, is to come up with new name. So the above example becomes

```
dog:=module()
option object(animal);
export move_the_dog::static:=proc(_self,\$)
print("In dog class. moving ....");
end proc;
end module;
```

And now Maple does not complain. But the whole point of type extension is to override the base class implementation, and not add a new implementation while keeping the base class one there.

Is there a way to do this in Maple? if not in current version, are there plans to add this to future Maple versions?

## Object does not have a moduleIterator error ...

This is another one of those problems that shows up only when I put all my modules in a lib and run the program, and unable to make a MWE in the worksheet.

Here is description of the problem. There is a module which is an object, which has no method. Just variables.

```export SUM_type:=module()
option object;

export starting_index::integer;
export body;
export power_on_x;
export actual_sum;
end module;```

some where inside the program, a list is created of such objects. This problem only shows up when there is ONE object in the list. Where there is 2 or more objects in the list, no problem. The problem shows up here

```for tmp in op(THE_SUMS) do    #BUG IN MAPLE
new_ode := new_ode + tmp:-actual_sum;
od; ```

The above code is from inside a proc in a module. The variable THE_SUMS is the list and tmp is just a local variable.

In the debugger, once I step in the loop, it generates an exception The strange thing, this only happens when there is ONE object in the list and not more. Here are screen shot from the debugger window To avoid this, I changed the loop to the following, and not it works with one or more entries in the list

```   for N from 1 to nops(THE_SUMS) do
tmp := THE_SUMS[N];
new_ode := new_ode + tmp:-actual_sum;
od;```

And this work. I spend a lot of time trying to make a MWE, but it works ok in worksheet. It looks like a scoping issue. I do not use ModuleIterator, and do not need it. When I added one to the object above just to see what happens, I saw the ModuleItrator being called. I have no idea why Maple wants to call it when there is one object in the list.

Here is one attempt on a MWE. but this gives no error.

```SUM_type:=module()
option object;

export starting_index::integer;
end module;
o:=Object(SUM_type):
o:-starting_index:=1;
L:=[o]:
for item in L do  #OK here since in global name space?
print(item);
od;
```

I am just repoting this in case someone have seen it before. I have a workaround it as I showed, which is to avoid using `for temp in list` when the list has objects in it.

Maple 2021.1 on windows 10

## How to convert a netlist to a ladder schematic?...

Hi Everyone,

I would like to convert a netlist to a ladder schematic by using Draw (Syrup). So far I have tried combinations of &+ and &// and have not achieved the correct result. Please help.

capnet:= "
V  1 0 1
L  1 2 1
C1 2 3 2uF
C2 2 4 3uF
C3 4 3 1uF
C4 4 5 1.5uF
C5 3 5 2.5uF
C6 3 0 3.5uF
C7 5 0 0.5uF
.end":

ckt:= [ V(1), L(1), C1(2.8E-6),
C2(3.E-6),  C3(1.E-6),
C4(1.5E-6), C5(2.5E-6) &+ C6(3.5E-6)
]:
Draw(ckt);

Thanks.

SyrupQuestion.mw

## Question on solve technique...

In the attached, I had to find the required coefficient. Now this has a relatively straight forward set of equation (which apparently form a closed group), so it was easy enough tee see what to do. In a more complicated situation that may be very difficult to see. I was a wondering is there is a better approach to use here? Prove/show the coefficient of in is    (1)  (2)  (3)  (4)  (5)  (6)  (7)  (8)  (9)  (10)  (11) ## Is the int option continuous backward ?...

The help page says that an option for int is continuous=truefalse. The help page reads

"Specifies whether int looks for discontinuities. " I interpret that as continuous=true means look for discontinuities

and false means do not look. A simple example, however, suggests that it is the opposite.

int(3/(5-4*cos(x)),x=0..2*Pi,continuous=true)=0

int(3/(5-4*cos(x)),x=0..2*Pi,continuous=false)=2*Pi.

I interpret this as continuous=true means "I guarantee the result is continuous, so do not look"

This would be a logical opposite to discont=true in the plot command: discont=true -> continuous=false!

## what are known limitation for running code in head...

I just spend 2 hrs trying to make this work in headless worksheet, but it does not work. I have A worksheet, which calls B worksheet. The call all go through OK and I set it all correctly. Set up the section in worksheet B and document property, etc.. as described in help.

So the call works OK and arguments are passed correctly from A to B.

The problem is that in worksheet B, I wanted to generate a plot in order to save it to postscript file.  This did not work. Nothing gets exported, even  though the plot is actually generated correctly in B.  How do I know this? Becaue B returns the plot back to A, and I can see the plot was correctly generated.  The file .ps never gets created. I look at the folder these worksheets are in, and there is no .ps file created.

But it was not saved to .ps file.  The same code works ok in standard worksheet and plot is saved correctly to .ps file using same code.

I also could not export the plot to JPEG file from worksheet B.  Only thing that worked is exporting some text to .TXT file from B.

Any one knows of limitation to calling one worksheet from another?  It seems somethings work in headless worksheet and some things do not. Which does not make it useful.

You might ask, why Am I doing this? Because I wanted to call that B worksheet later on (if it worked) from a script to do the plot exporting, as the quality is better when in a "worksheet" vs. command line).

But since this does not even work when calling the worksheet from another worksheet, then there is no point of trying it from the command line.

Attached A and B. To try it, please save both worksheets in same folder and simply open A.mw and run it. It will call B.mw

This is the first time I used documentTools package. I did not even know one can call one worksheet from another before.

I suspect it had to do with print(); call becoming inactive in headless worksheet, which causes nothing to be send to the postscript file. But I am not sure. Without print(); one can't export the plot.

I do not understand why is it so hard in Maple to export a plot to a PDF. Why is there not a simple export command to export a plot to PDF like with all the other software out there in the world?  This is the year 2021, not 1980. How many decades does Maplesoft needs to implement export to PDF?

This is on windows 10. Maple 2021.1

This is A.mw

 > restart;
 > currentdir("C:\\tmp\\TEST_MAPLE"); p:=DocumentTools[RunWorksheet]( "B.mw" , [the_function=sin(x),the_variable=x]  ): print("Back from calling worksheet B. Here is the result"); p;   >

This is B.mw

Inputs

 > the_function:=0;
 > the_variable:=0;
 > p:=plot(the_function,the_variable=-2*Pi..2*Pi): full_file_name:=cat("C:\\tmp\\TEST_MAPLE\\tmp.ps"); plotsetup(ps,plotoutput=full_file_name): print(p); plotsetup(default): return p;