nm

12238 Reputation

20 Badges

13 years, 257 days

MaplePrimes Activity


These are replies submitted by nm

@Alfred_F 

OK, but the IC is at infinity? You changed y(infinity)=Pi to y(u)=Pi.  I am not sure the teacher will accept this.  How is y(u)=Pi the same as y(infinity)=Pi?    

This is from textbook

The book actually do not give solution for this in back. 

Both Mathematica and sympy could not solve this with IC  y(infinity)=Pi. But can solve it with no IC.

The difficulty here is the IC. I can solve this by hand without IC, but do not know how with the IC y(infinity)=Pi and do not know how Maple also handled the IC internally.

@WD0HHU 

Fyi, to use Array like you did and streatch out each plot, there is a much simpler way, like this

s:=t->2*t^4-30*t^3+135*t^2-120*t-10:
v:=t->diff(s(t),t):
p1:=plot(s(t),t=0..8,'gridlines','thickness'=3,'color'="red",'title'="Plot of s(t)"):
p2:=plot(v(t),t=0..8,'gridlines','thickness'=3,'color'="blue",'title'="Plot of v(t)"):

# now use 

plots:-display(Array([p1,p2]),size=[0.5,0.5]); 

This gives similar to what you showed there

 

@dharr 

"I guess with infinity it is safer to routinely use limit."

Yes ofcourse, but as I said, this is all done in code.

The code that use eval does not check now if the value to replace in the expression is infinity or not. I can add this check, but eval() is used in 1,000 of places and no check now is done.

I can ofcourse make my own my_eval() and inside it add this check so it is done in one place and change all current calls to eval() to my_eval().

But the bigger question is not any of this.

It is this:  should the underlying CAS system handle this itself and do the right thing (which would be to return undefined in this example), or should user code be the one responsible for calling eval with correct arguments?

Returning wrong value from a Maple builtin function is never an acceptable option, no matter what the user calls it with, and even if it is documented.  One can not document away wrong design in a function by saying

              "This function can return wrong answers if called with wrong input, so make sure to use correct input"

Also speed and performance should never be consideration when it comes to returning correct result or not. I'd rather have a very slow function that always return correct results than a super fast one that once in a while returns a wrong result.

@Kitonum 

The problem with this Maple design is that eval can then return wrong results.

This is all done in code.   

How is a function supposed to know that there is issue such as this before using eval on an expression being passed to it?

It seems then one should always use limit to replace symbol by value in expression to be safe. right?

So I have now to go over all my code and replace each place eval is used by limit.

I found this by accident when I was getting wrong result from some computation. 

It would be much better design if eval returns undefined instead in such case. This way the code can detect this problem instead of returning wrong result.

Fyi, using the view option is correct, it is what Maple AI says to do when I just asked it how to set x range using plots:-display

AI said:

To set the x-range (and optionally the y-range) when combining plots with plots:-display, pass the view option to display. 
The view option takes a list [xmin..xmax, ymin..ymax]. If you only want to control the x-range you 
still supply both ranges, e.g. use the full y-span that you want to keep.

Below is a short example showing two plots combined while fixing the x-range to 0..2*Pi and the y-range to -1.5..1.5.

Notes:
• If the individual plots already have different x-ranges, the view option passed to display overrides them.
• You can also use numeric endpoints (e.g. 0..6.283185307179586) or symbolic expressions (e.g. 0..2*Pi).
• If you only want to set x-range but leave y autoscaled, give a wide y-interval (for example -infinity..infinity is not accepted; instead choose a sufficiently large range or compute the needed y-limits beforehand).

@acer 

That is strange. But I just updated the link, and checked it works OK.

https://mapleprimes.com/questions/231890-How-To-Make-Maple-Write-Sqrt22-As-1sqrt2-


Hopefully the link is OK now. I must have pasted wrong link first.

This is builtin transformation and there is no easy way or option to disable it. But see same question here

https://mapleprimes.com/questions/231890-How-To-Make-Maple-Write-Sqrt22-As-1sqrt2-

May be Maplesoft should have an option to turn this off.

fyi,

Maple 2026 introduced new type just for this, called variable

So one can now just do indets(expr,variable)

I do not use equations labels, but I just turned it on, and labels do show. Maple 2026 on windows 10.

Did you check under options,  that equations labels are turned on?

If so, then this could be windows 11 issue.

 

@Alfred_F 

You could also look at 

PolynomialTools:-Split(x^4-12*x-12,x);

But factors are given in terms of RootOf.  see ?Split for more info.

@janhardo 

Thanks for code. So which do you think is better for making UI in Maple? Maplets or Explore?

@janhardo 

Thanks, but are you saying Maplets do not have sliders?  I need sliders to change parameters as it is much easier to use.

I've had same exact error many times.   Unable-To-Upload-Worksheet-To-MaplePrimes

It seems random and no one knows what causes it.  

@sand15 

Thanks for checking. Then it is a bug in recent versions of Maple. Will report it now. I doubt this will be fixed by Maple 2026 but may be in a future version it will.

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