## How do I set up coordinates system for general rel...

How can I resolve the following error message? More specifically, how do I set up a coordinate system different from cartesian, spherical, etc in order to pass it to the metric?

restart;
with(Physics);

Setup(mathematicalnotation = true);
[mathematicalnotation = true]
Setup(signature = `+---`);
[signature = + - - -]

ds2 := [(x^2-y^2)*cos(2*u)+2*x*y*sin(2*u)]*(du^2)-2*x*(dv^2)-dx^2-dy^2;
Setup(coordinates = (Z = [u, v, x, y], metric = ds2));
* Partial match of  'coordinates' against keyword 'coordinatesys\

tems'
Error, (in Physics:-Setup) expected a list with 4 names, where 4 is the spacetime dimension, or one of the keywords cartesian, spherical, cylindrical; received: ds2

## fsolve for system of nonlinear of equations...

When I used fsolve command for a system of the nonlinear algebraic equation, the result will be one set of solution

for example:

f := x+2*y = 3;
g := y+1/x = 1;
fsolve({f, g});
{x = 2.000000000, y = 0.5000000000}

where when we use the solve command

we will get

solve({f, g});

{x = -1, y = 2}, { x = 2, y = 0.5 }.

The question is:  why fsolve command give the values of x and y (x=2 and y=0.5 ) and ignore ({x = -1, y = 2})?

why didnt give ({x = -1, y = 2}). and ignore (x=2 and y=0.5 )?

## minus~ doesn't seem to act as an element-wise oper...

Help page says "minus~" is an element-wise operators in Maple
Why this command doesn't return [{1}, {3}] but generates an error ?
[{1, 2}, {2, 3}] minus~ {2};
Error, dimension bounds must be the same for all container objects in an elementwise operation

OK, you can answer I could use  map(u -> u minus {2}, [{1, 2}, {2, 3}]), but it wouldn't explain the reason of the (my?) error.

## how to plot this kind of graph?...

duaxisplot([x=1,x=2,x=3], ....);

just want to plot multiple vertical line with a time series at the same time

## How to use loop variable as a parameter in functio...

and the desired result is

x → P(1, 1, 1, x)
x → P(2, 1, 1, x)
x → P(3, 1, 1, x)

How could one tell Maple to simplify  log(x)+log(y) to log(x*y)?

And known identity  https://en.wikipedia.org/wiki/List_of_logarithmic_identities

This is what I tried

```restart;
simplify( ln(x) + ln(y), symbolic);
simplify( ln(x) + ln(y), ln);
simplify( ln(x) + ln(y), size);
```

Maple knows this identity, becuase

```simplify( ln(x*y)- (ln(x)+ln(y)) , symbolic)
0```

Note, this identity has no assumptions on it. It is defined as is.

Maple help page says

```ln(x y) ==> ln(x) + ln(y) provided     0 < x  and   signum(y) is unknown
```

so, is Wikipedia and all the other references I saw wrong for not showing this assumption on x>0 whey they state the product rule for logs?

I want to go the other way

` ln(x) + ln(y) ==> ln(x y) `

So this releation should really be written as

`ln(x) + ln(y) <==> ln(x y) `

## How could I substitute the (t1*e) into t2 at the i...

How could I substitute the (t1*e) into t2 at the index of e?  I am trying many ways to do that, but it doesn't work. please help me.

 > restart:
 >
 >
 >
 > (1/8)*alpha[2](t[1], t[2])*b^3*exp((3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*b^3*exp(-(3*I)*omega*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp((3*I)*t[1])+(1/8)*alpha[2](t[1], t[2])*A(t[2])^3*exp(-(3*I)*t[1])+3*alpha[2](t[1], t[2])*b^3*exp(-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*b^3*exp(I*omega*t[1])*(1/8)-I*alpha[1](t[1], t[2])*A(t[2])*exp(-I*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-I*omega*t[1])*(1/4)-I*(diff(A(t[2]), t[2]))*exp(-I*t[1])+3*alpha[2](t[1], t[2])*A(t[2])*exp(-I*t[1])*b^2*(1/4)-I*alpha[1](t[1], t[2])*b*omega*exp(-I*omega*t[1])*(1/2)+I*alpha[1](t[1], t[2])*b*omega*exp(I*omega*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^3*exp(-I*t[1])*(1/8)+I*(diff(A(t[2]), t[2]))*exp(I*t[1])+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]-(2*I)*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(-I*t[1]+(2*I)*omega*t[1])*(1/8)+q[1](t[1], t[2])+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^3*exp(I*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(-(2*I)*t[1]+I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]-(2*I)*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])*b^2*exp(I*t[1]+(2*I)*omega*t[1])*(1/8)+diff(q[1](t[1], t[2]), t[1], t[1])+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]-I*omega*t[1])*(1/8)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp((2*I)*t[1]+I*omega*t[1])*(1/8)+I*alpha[1](t[1], t[2])*A(t[2])*exp(I*t[1])*(1/2)+3*alpha[2](t[1], t[2])*A(t[2])^2*b*exp(I*omega*t[1])*(1/4)+3*alpha[2](t[1], t[2])*A(t[2])*exp(I*t[1])*b^2*(1/4);
 (1)
 >
 >
 > eq:=combine(subs(w=3+e*sigma,%),exp);
 (2)
 > expand(%);
 (3)
 > eq:=combine(subs({e^(t1*e)=e^t2},%),exp);
 (4)
 > How could I substitute the (t1*e) into t2 at the index of e?  I am trying many ways to do that, but it doesn't work. please help me.   (t1*e)=t2

## Product of two Sum...

Hi all

Hope the best for all.

I have a single product of two sum, where the second sum admits one variable, namely j, from first one.

how can I it via maple?

thanks for any help.

## How to obtain a function that is defined as the in...

I have a function g(x,t), which is the numerical result of a PDE.

How to calculate the function f (t), defined by:

f:=t->int(g(x,t),x=a..b)

I tried to calculate that way, but that did not work.

Thanks for the help.

## Decrypt message...

f(a)(x) = a*x mod 256  for all x in Z[256]

## problem in loop-for...

how can write this loop that has written in matlab to maple??
i=1;
for e=T1P1:0.0399:T1P;
E(i)=e;
gama1(i,:)=a-atan(e/Rb1);
i=i+1;
end

## MAPLESOFT TRIAL...

HELLO

I AM A STUDENT AND WAS LOOKING FOR USING MAPLE2018.

I REQUESTED FOR A MAPLE EVALUATION. MY QUESTIONS ARE:

FOR HOW LONG CAN I USE THIS EVALUATION VERSION?

SECONDLY, WHAT SOFTWARE FACILITIES I WOULD NOT GET WITH THIS EVALUATION VERSION? WHAT ARE THE DIFFERENCES BETWEEN THE PRICED ENTERPRISE VERSION AND MAPLESOFT EVALUATION VERSION?

THIRDLY, WHAT ARE THE DIFFERENCES BETWEEN MAPLESOFT STUDENT VERSION AND THE ULTIMATE PRICED ENTERPRISED VERSION?

PLEASE REVERT BACK TO ME AT THE EARLIEST.

## Remove Assumptions for Code Generation...

Hi,

this has been asked before but none of the other answers worked for me. I want to generate code from expressions that were simplified using some assumptions. I the assumptions remain on the variables Maple replaces variable names wich I don't understand.

Here is my script where I tried to remove the assumptions based on the answers of previous questions. Unfortunately, even though assumptions are removed in the end, Code generation still replaces the variables.

Here is my minimal exaple Code:

 >
 > restart:
 >
 > # test removing assumptions
 > funa:=x+y
 (1)
 > Maple_proc := codegen[makeproc](funa,(ListTools[Flatten]([eval(alist,1)])));
 (2)
 > # make some assumptions
 > assume(x,real);assume(y,real);
 > x,y
 (3)
 > #place variables in a list
 > alist:=[x,y];
 (4)
 > # make cool interferences with assumptions...
 > # clear assumptions
 > # try 1 from https://www.mapleprimes.com/questions/207601-Remove-Assumptions-
 > nms:=convert(indets(alist,name),list); nmsS:=convert~(nms,string); L:=StringTools:-Substitute~(nmsS,"~",""); #Removing "~" L1:=parse~(L); S:=nms=~L1; Expr:=subs(S,expr);
 (5)
 > hasassumptions(x)
 (6)
 > # try 2
 > nops(alist)
 (7)
 > for i from 1 to nops(alist) do parse(cat(StringTools[Substitute]~(alist[i],"~",""),":='",StringTools[Substitute]~(alist[i],"~",""),"'")); end do;
 (8)
 > # check if assumtions are there
 > hasassumptions(x)
 (9)
 > #try 3 https://www.mapleprimes.com/questions/39555-Unassume
 > for u in alist do `property/object`[u]:=evaln(`property/object`[u]); `property/OrigName`[u]:=evaln(`property/OrigName`[u]); end do;
 (10)
 > hasassumptions(x)
 (11)
 > hasassumptions(y)
 (12)
 > alist
 (13)
 > funb:=x+y
 (14)
 > Maple_proc := codegen[makeproc](funb,(ListTools[Flatten]([eval(alist,1)])));
 (15)
 > Maple_proc := codegen[makeproc](funa,(ListTools[Flatten]([eval(alist,1)])));
 (16)
 >
 > CodeGeneration[C](Maple_proc, optimize, declare=[x::float,y::float], defaulttype=float, deducetypes=false, coercetypes=false, output="fun.c");
 >
 >
 >
 >
 >
 >
 >
 >
 >