## 10 Reputation

4 years, 302 days

## Is there something similar to solve/iden...

Maple 2019

Hello,

I am solving some overdetermined system of ODEs in cylindrical coordinates r,phi,Z. I obtain some equations of the following type:

`(diff(_F1(phi, Z), phi)*r + diff(diff(s_r(phi, Z), phi), phi))/r = -s_r(phi, Z)/r`

As can be seen, the differentiated functions do not depend on r, which is an independent variable. Thus, the correct solution is to separate the equation and have

`_F1(phi,Z)=_F1(Z), s_r(phi,Z)=s_r(Z).`

By using dsolve, I always obtain a solution containing r.

A similar problem that does no contain derivatives is solved by solve/identity.

Is there something similar for dsolve?

EDIT: I again put here more info and file. I solve some overdetermined system of differential equations.

```[diff(s_r(r, phi, Z), r) = 0, diff(s_r(r, phi, Z), phi) = -diff(s_phi(r, phi, Z), r)*r^2,
diff(s_Z(r, phi, Z), r) = -diff(s_r(r, phi, Z), Z), diff(s_phi(r, phi, Z), phi) = -s_r(r, phi, Z)/r,
diff(s_Z(r, phi, Z), phi) = -diff(s_phi(r, phi, Z), Z)*r^2, diff(s_Z(r, phi, Z), Z) = 0,
diff(m(r, phi, Z), r) = s_Z(r, phi, Z)*B_phi(r, phi, Z) - s_phi(r, phi, Z)*B_Z(r, phi, Z),
diff(m(r, phi, Z), phi) = s_r(r, phi, Z)*B_Z(r, phi, Z) - s_Z(r, phi, Z)*B_r(r, phi, Z),
diff(m(r, phi, Z), Z) = s_phi(r, phi, Z)*B_r(r, phi, Z) - s_r(r, phi, Z)*B_phi(r, phi, Z),
s_r(r, phi, Z)*diff(W(r, phi, Z), r) + s_phi(r, phi, Z)*diff(W(r, phi, Z), phi) +
s_Z(r, phi, Z)*diff(W(r, phi, Z), Z) = 0]```

After some time, I arrive at the equation in the original question. So the independance of the other functions on r is the consequence of the other equations.

Here is the file (shortened): mwquestion2.mw

## How can I force solve to ignore independ...

Maple 2019

Hello everybody,

I am new to MaplePrimes, so I am sorry for possible bad formatting.

I am solving some physical problem in cylindrical coordinates, so the EDIT independent variables are r,phi,Z. The equations I obtain contain constants _C from dsolve and constant parameters aplha[i,j], for example

I would like to solve this type of equations for all values of the variables, namely phi in the example above.

If I do not choose the variables for which to solve, I get phi=phi as one of the equations in the solution. If i choose all the variables except phi, i get an the expression for the constants containing the variable phi.

Is there a way to solve these equations automatically or do I have to separate them manually using collect and coeffs?

Or could the solution be the comand Parameters from Physics package?

EDIT: I did not explain the problem properly. I am solving some complicated set of determining equations to obtain integrals of motion. They are rce in the attached file. I substitute some ansatz for the magnetic field and I solve them for

The first set of equation, called third in the file are solved by HOconds_polar_solved. This is where the  konstants alpha[i,j] appear. I substitute HOconds_polar_solved into the equations rce and try to solve them for the remaining functions.

Because it is an overdetermined system, I get some equations of the type in the original question or (for example)

`8*r^5*_C1*((alpha[4, 4] - alpha[5, 5])*cos(2*phi) + sin(2*phi)*alpha[4, 5])=0`

Because r and phi are the independent veriables of the system, the solution to the equation above should be

_C1=0 or (alpha[4,4]=alpha[5,5] and alpha[4,5]=0)

But I get the following.

```solve(8*r^5*_C1*((alpha[4, 4] - alpha[5, 5])*cos(2*phi) + sin(2*phi)*alpha[4, 5]));
{_C1 = 0, phi = phi, r = r, alpha[4, 4] = alpha[4, 4], alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5,5]},
{_C1 = _C1, phi = phi, r = 0, alpha[4, 4] = alpha[4, 4],  alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5, 5]},
{_C1 = _C1, phi = phi, r = r, alpha[4, 4] = -tan(2 phi) alpha[4, 5] + alpha[5, 5], alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5, 5]}
```

The file (part of the original file, which is very long): question.mw

EDIT 2: I changed the title to contain independent variables, which makes the answer more clear. The second Answer from Carl Love works fine, at least in the presented case.

 Page 1 of 1
﻿