13653 Reputation

19 years, 294 days

Physics...

@Carl Love I haven't installed the Physics Uptates package.

In fact I haven't been able to do that. I had no problems in Maple 2021 or 2022.

Not defeated at all...

@Christian Wolinski Maybe I don't understand what you mean by the whole mechanism of assume.
I certainly think that the `assuming` facility is very useful, but it isn't perfect; nothing is.
My example function f:=x->a*x  was applied to a, not some other name or number. That was the cause of the problem , but solved by using simplify/assume.

In your case there was no reason for me not to use assuming, because assumption are put on x and there is no possibilty for any conflict between two versions of x as there was in my example with a.

```restart;
y:=sqrt((x^2*(x^2-4))/(x^2-1));

minimize(simplify(evalc(Re(y))),x=-1..1,location) assuming x<1,x>-1;

maximize(simplify(evalc(Re(y))),x=-1..1,location) assuming x<1,x>-1;

minimize(simplify(evalc(Re(y))),x=2..infinity,location) assuming x>=2;

maximize(simplify(evalc(Re(y))),x=2..infinity,location) assuming x>=2;
```

simplify/assume...

@Christian Wolinski Not much use is made these days of this version of simplify with assumptions:

```restart;
f:=x->a*x;
simplify(sqrt(f(a)),assume=[a<0]); # -a
simplify(sqrt(f(a))) assuming a<0; # See below
lprint(%);
```

The difference is that in the first simplify version sqrt(f(a)) is evaluated to sqrt(a^2) and then simplified under the assumption a<0.
In the second case the assumption is placed on the a we can see, i.e. the argument to f , before anything else is done.
This second case is illustrated by:

```restart;
debug(`assuming`);
f:=x->a*x;
simplify(sqrt(f(a)))  assuming a<0;
```

You will see that the first thing that happens is that the a in sight is replaced by a~, the a used in the definition of f is not changed.
Thus there are 2 totally different versions of a. So the evaluation will be of sqrt(a*a~) where nothing is known of the first a.
So it will only result in (a*a~)^(1/2).

Finally after that there is 'cleaning' where the tilde is removed before output resulting in (a^2)^(1/2).

####
If you try the assumption a>=0 you may be surprised that both versions of simplify return a,
To see why try this:

```restart;
f:=x->a*x;
simplify(sqrt(f(a))) assuming a>=0; # a
### Explanation:
simplify(sqrt(a1*a)) assuming a1>=0;
subs(a1=a,%);
simplify(sqrt(a1*a)) assuming a1<0;
subs(a1=a,%);
```

#### Making use of simplify/assume in the present case:

```restart;
y:=sqrt((x^2*(x^2-4))/(x^2-1));
solve(evalc(Im(y)), x);
minimize(simplify(evalc(Re(y)),assume=[x<1,x>-1]),x=-1..1,location);
maximize(simplify(evalc(Re(y)),assume=[x<1,x>-1]),x=-1..1,location);
minimize(simplify(evalc(Re(y)),assume=[x>=2]),x=2..infinity,location);
maximize(simplify(evalc(Re(y)),assume=[x>=2]),x=2..infinity,location);
```

y(x) and x(y) ?...

You seem to have the list:  [x(y), y(x)] which doesn't make much sense here.
An example resembling yours:

```restart;
ode:=diff(y(x),x,x)+y(x)^2=sin(x);
DEtools:-phaseportrait(ode,y(x),x=0..2,[[y(0)=1,D(y)(0)=3]]);
```

Make maple.ini yourself...

@MagnusMJ A maple.ini file has to be created by the user. I have one and I put it in the location:
C:\Users\userid\maple.ini, where userid is my user id.
Use an ordinary text editor like Windows' Notepad. Save the file as maple.ini.
Create maple.ini .
##################
Somebody told me a long time ago to: (now a quote from my maple.ini file)
#Make sure that % = NULL by putting all statements inside a procedure
#that returns NULL.
#####
thus mine starts like this:
proc()
.....
the statements you want
.....
NULL
end proc():

Could it be a license problem?

Thanks again...

@Carl Love Thanks for the suggestion. It certainly couldn't hurt.

Thanks!...

@Carl Love I'm happy to see that the post now appears under questions.

I turned your post into a question....

@xavier I turned your post into a question. Initially after that it appeared to have disappeared, but I found by searching you (xavier) under Users.

A recent post turned to question is gone...

This morning I read the post "décomposition d'un entier en somme d'entiers et partage d'un ensemble non vide en u parties non vides" by the user xavier. There was also a comment on that post by xavier.
It seemed to me that the post was really a question. So I turned it into a question. Initially on my screen it said  Question: ---title---.
But it now seems to be gone. At this time it still appears as the last post in the menu.

Added about an hour later: I found the post, now as a question by searching the user xavier.

By himself?...

@Christopher2222 Are you sure that sursumcorda didn't delete his own comment?

Yesterday I saw under "Active Conversations" the following:
https://www.mapleprimes.com/questions/237081-Tildes-All-Over-Again

Initially I didn't check the date, but just wrote a comment, which stated that there was no tilde problem in Maple 2023.
When I later returned to the link I saw that the question was posed in January 2006, i.e. 17 years ago, and that no responses were added later than that time. Thus my comment was totally irrelevant, so I deleted it.

I'm not suggesting that sursumcorda's comment was irrelevant. Clearly it was very relevant.

Had anybody responded to my comment on these old tilde problems I wouldn't have deleted my comment.

LinearAlgebra:-Map...

@Christopher2222 Thanks for reminding me of Map.

In your case you could use it like this:

```restart;
a := [[1.2, 4.3], [3.2, 5.3]];
c:=Matrix(a);
LinearAlgebra:-Map[(i,j)->evalb(j=1)](floor,c);
c;
```

I prefer, however, the way given in my answer.

Worksheet corrected...

@felixiao I couldn't find out what was wrong; everything looked fine.
Therefore I copied the whole code and put it in a text editor (actually Notepad++).
In there I couldn't see any problem either, but I copied the code planted there and put it in a new worksheet in Maple.

Save it as the .mw file:  MaplePrimes23-09-22_Matrix_problem.mw

### Note added later: I did this in Maple2023.1, but I also tried in the much older Maple 12. The problem was the same there. For the remedy this time I used the Notepad that comes with Windows.

####

The plot looks like this:
.

OK in Maple 12...

@vv PolynomialSystem and solve both work with V as a list in Maple 12, but not in Maple 2021.

H5 and H7...

@Carl Love The matrices that are being inverted resulting in H5 and H7 and their determinants:

```H51:=Matrix([[G11, G12], [G21, G22]]); ## ~H5
LinearAlgebra:-Determinant(H51);  ## 0. + (9.2517792695382088910002830954*10^(-32))*I
H71:=Matrix([[Z11, Z12], [Z21, Z22]]);   ## ~H7
LinearAlgebra:-Determinant(H71);  ## 0. - (1.89398211168871707929210978553*10^(-30))*I
```

Inverting the first matrix H51 results in the error. For the second we get in shortened form:

```evalf[5](convert(H71^(-1),listlist));
## Result:
## [[1.1548*10^16 - (1.3826*10^16)*I, -6.7969*10^15 + (8.1376*10^15)*I], [0. - (1.8014*10^16)*I, 0.15598 + (1.0603*10^16)*I]]```
 First 8 9 10 11 12 13 14 Last Page 10 of 229
﻿