## Error, (in Matrix) too many patterns for typematch...

I could not create a 50 X 17 matrix, part of a multiple linear regression exercise & received the message:

"error in (Matrix) too many patterns for typematch". This appears to be an undocumented message in the help page.

## Why do I loose the Kernel Connection?...

I was using the DirectSearch:-GlobalSearch function on a LaguerrelL for values of 4 and 5. At a value of 4 I get a solution, but at 5 I get an error message that the Kernel connection is lost. I ran this script on two different PCs using Maple 2019 and 2020 with WIN 10 and get the same results. Why does this happen?

Here is my worksheet. Thanks for looking.

## Are numerical methods and implicit, exact methods ...

Hi,

I am studying nonlinear differential equations, and came across an interesting one on maple's help page.  I made a post about this equation already, but I have decided to make a new post because the topic is slightly different than from the previous post.

The topic of this post is:

"Can numerical methods and exact, implicit techniques find false solutions?"

To make the discussion clearer, the rest of this post can be found in the maple file I created.

## convolution , analytic vs numeric...

Hello,
I am trying to compute the convolution integral numerically and compare the result with the analytic result. My numerics is giving terrible results:

## differences between solve and PDEtools:-Solve...

Is there one place which summarizes major difference between using solve vs. PDEtools:-Solve to solve equation? (ofcourse can one read help for both commands, and try to figure the differences this way, but this is not as easy as it sounds. I was looking more for a short basic summary type list. So I am making one myself in my maple cheat sheet).

I am trying to switch to PDEtools:-Solve from solve, but I keep noticing strange differences. Here is an example

example A

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x));
check:=odetest(sol,ode);
PDEtools:-Solve(check=0,x) assuming x>-1,x<6


Error, (in assuming) when calling 'PDEtools:-Solve'. Received: 'not a system with respect to the unknowns {x}'

Compare to

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x));
check:=odetest(sol,ode);
solve(check=0,x) assuming x>-1,x<6;


x

Now, back to first example above using Solve. I moved the assuming inside, and now the error went away

Example B

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x));
check:=odetest(sol,ode);
PDEtools:-Solve(check=0,x,assume=[x>-1,x<6]);


But I noticed I can not do the same with solve. i.e. move the assuming inside solve, it now gives an error

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x));
check:=odetest(sol,ode);
solve(check=0,x,assume=[x>-1,x<6]);


Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is assume = [-1 < x, x < 6]

So first difference is that one can use assume= inside Solve, but not inside solve. Which is fine.

But I still not sure why first example A above gives error with Solve but not with solve. Any idea why that is?  Notice that example A gives an error with Solve, only when adding x<6 to the assumption. So this works

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x));
check:=odetest(sol,ode);
PDEtools:-Solve(check=0,x) assuming x>-1

No error, and now it gives

But was trying to find why it failed when adding x<6

Maple 2020.2 on windows 10.

## tricky verification of odetest result...

This ode

restart;
ode:=(x+1)*diff(y(x),x)+y(x)^(1/2) = 0;
ic:=y(0) = 1;
sol:=dsolve([ode,ic],y(x))


Direct use of odetest does not give zero.

res:=odetest(sol,ode)

When asking Solve for possible values of x which makes the above zero, it only gave the upper bound

PDEtools:-Solve(res=0,x)

The actual range which makes res=0 is actually -1<x<exp(2)-1

res:=odetest(sol,ode) assuming -1<x,x<exp(2)-1

How could one using Maple obtain this range -1<x<exp(2)-1?

Mathematica gives the answer using Reduce:

res=Log[Sqrt[x+1]]-1+Sign[Log[(x+1)]-2]*Log[Sqrt[x+1]]-Sign[Log[x+1]-2];
Reduce[res==0,x,Reals]

Is it possible to obtain such result in Maple, since Solve did not give complete answer.

Maple 2020.2

I want to read file dates (for data files) from inside Maple.  Specifically, I want to automate the comparison of access dates.

I thought I'd done this in the past, but my attempt to recreate it has led me to think that I am remembering incorrectly.

Is there a way of doing this?

I don't deeply care about portability (I'm working on Windows 10 and that would be good enough), but since I'm asking the question please comment on the easiest way to make this portable.

I am aware that by default Windows 10 doesn't update the access date.  On the machines I care about, I have changed the configuration so Windows is updating the access date (often enough for my purposes).  I have PowerShell scripts that work correctly.

## Grid toolbox and distributed computing....

I have several questions about Grid Toolbox. I am getting into distributed computing for a very large problem I have been working on for a long time; I am working on the simple examples that come with the Grid package, and I am not having much success. I am fairly experienced in Maple but I need help with this. My e-mail is harrisjtster@gmail.com.

## How to simplify the trigonometric expression...

How to simplify this trigonometric expression with Maple? I only know the way with  identify command, which is difficult to call mathematically correct:

restart;
Expr:=arctan((1-tan(20*Pi/180))/(1-tan(25*Pi/180)));
evalf[15](Expr);
identify(%);

## Strange behavior of simplify...

I do not underand why these two gives different results

restart;
mysol:= exp(sqrt( y(x)^2/x^2+1)) = _C1*x;
ode:=diff(y(x),x) = (y(x)^2+(x^2+y(x)^2)^(1/2)*x)/x/y(x);


And now case A:

simplify(odetest(mysol,ode)) assuming x>0;

0

But case B

res:=odetest(mysol,ode):
simplify(res) assuming x>0;

#does not give zero

Why is putting the result in a variable first makes it give a different result?

What should one do so both case A and B give 0 ?

It looks like scoping issue of assuming. But this is really confusing, I did not expect that putting an intermediate result in a variable first will make a difference.

Maple 2020.2, Physis 897

## polor plot color function...

I'm new to maple ,I have a series of data  which are independent of angle to polarplot. the first coordinate is r, and the second coordinate is f(r,theta). what I want is  to color the figure according to the value of f(r,theta), like the figure below.

the data is listed as follow:

[[0., 3.], [0.2000000000e-1, 2.960601340], [0.4000000000e-1, 2.922410774], [0.6000000000e-1, 2.885436547], [0.8000000000e-1, 2.849687068], [.1000000000, 2.815170918], [.1200000000, 2.781896852], [.1400000000, 2.749873799], [.1600000000, 2.719110871], [.1800000000, 2.689617363], [.2000000000, 2.661402758], [.2200000000, 2.634476731], [.2400000000, 2.608849150], [.2600000000, 2.584530087], [.2800000000, 2.561529812], [.3000000000, 2.539858808], [.3200000000, 2.519527764], [.3400000000, 2.500547591], [.3600000000, 2.482929415], [.3800000000, 2.466684589], [.4000000000, 2.451824698], [.4200000000, 2.438361556], [.4400000000, 2.426307219], [.4600000000, 2.415673985], [.4800000000, 2.406474402], [.5000000000, 2.398721271], [.5200000000, 2.392427650], [.5400000000, 2.387606862], [.5600000000, 2.384272500], [.5800000000, 2.382438431], [.6000000000, 2.382118800], [.6200000000, 2.383328042], [.6400000000, 2.386080879], [.6600000000, 2.390392334], [.6800000000, 2.396277732], [.7000000000, 2.403752707], [.7200000000, 2.412833211], [.7400000000, 2.423535514], [.7600000000, 2.435876220], [.7800000000, 2.449872265], [.8000000000, 2.465540928], [.8200000000, 2.482899838], [.8400000000, 2.501966977], [.8600000000, 2.522760694], [.8800000000, 2.545299706], [.9000000000, 2.569603111], [.9200000000, 2.595690390], [.9400000000, 2.623581418], [.9600000000, 2.653296473], [.9800000000, 2.684856242], [1., 2.718281828]]

## coordinate axis tickmarks...

A torus can be defined parametrically by:

where θ, φ are angles which make a full circle, so that their values start and end at the same point, R is the distance from the center of the tube to the center of the torus, r  is the radius of the tube.

R:=10:
r:=5:
plot3d( [ ( R+r(u,v)*cos(v))*sin(u),
( R+r(u,v)*cos(v))*cos(u),
r*sin(v)
],
u=0..2*Pi,
v=0..2*Pi,style=patchnogrid,
scaling=constrained,
scaling=constrained,
coordinateview=[-15..15, -15..15,-5..5],
lightmodel=light3, viewpoint = circleleft);

I set range [-5..5] of the Z axis，but  the range of  Z axis tickmarks  in the above image maybe in [-4.5..4.5] .

How to have tickmarks included at -5 and 5 on the Z axis?

## determine coefficiants a0,a1,a2,b0,b1,b2?...

How I can determine coefficiants a0,a1,a2,b0,b1,b2?

Thanks

equation.mw

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/equation.mw .