## Better way to change all indexed variables in an e...

I have expressions with head Sum that are all either one single Sum or sum of these Sum's. So my expression is either

Sum(.....)+Sum(....)+Sum(...)   or Sum()

Inside each Sum, I have indexed a[n] and also possibly nonindexed For an example

Sum( a[n]*x + a, n=1..10)

And I want to change all the indexed a[n] to b[n]

Hence the example above it will becomes  Sum( b[n]*x + a, n=1..10)

I can't just use eval(expr,a=b) as that will also change the non-indexed a to b which I want to leave as is. There will be only one single indexed variable in the sum. In this example it is `a`

Below is a general example and my solution. I'd like to find if there is a more canonical way or shorter more direct way to do this in Maple.

```restart;
expr:=Sum(x^(n+r)*a[n]*(n+r)*(n+r-1)+a[n-1]+3*a*x^10,n = 0 .. infinity)+Sum(4*a*x^(n+r)*a[n],n = 0 .. infinity)+Sum(4*a[n-1]*x^(n+r)+a[n]*x+a*x,n = 1 .. infinity) = 0;

evalindets(expr,specfunc( anything, 'Sum' ),f->Sum(evalindets(op(1,f),'indexed',ff->b[op(ff)]),op(2,f)))

```

I used evalindets twice. Once to look for Sum, and then to look for 'indexed' within each sum. It seems to work. Here is screen shot of the output

If you asking why I have indexed a and non indexed a in the same expression? Well, it is because the non-indexed happend to be a coefficient of the ode that the user used. So it is part of the input, which I have no control over. But the indexed is a local variable I am using inside the function being called to process the input.

On the screen they look the same. But they are actually not the same. The indexed is local to the function and the non-indexed is input via argument. So it is global symbol.

## What is Ei_1(x) when solving an integral?...

 (1)

 (2)

What is Ei1 in Maple?

## plot a volumetric body ...

How I can plot a volumetric body with the coordinates provided in the text file attachment?

after finding the geometry curve I want to find the curve that passes through the middle source.

1.txt

## Convert given Eq. into Polynomial with a variable ...

Can someone explain how to use Maple to get from Eq. (4) to Eq. (5) using Eq. (6) to (8)?

This is the Peng Robinson Equation of State (1976)

I tried some stuff like using algsubs  on Eq. (4) and then do some polynomial operations (expand, collect etc.) It did not work out though. I'm grateful for any advice!

## using arrows = curve gives error in DEplot. Any wo...

After I switched to using arrows = curve in the call to DEtools:-DEplot I found errors in some calls.

Is there a workaround other than not using this option? As phase plot looks like better with this option. For now, I will remove this option.

Here is an example

```restart;

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0],arrows = 'curve')
```

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

But this works

```restart;

ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0;
x_range:=-0.99 .. 0.99;
DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0])

```

I will report this to Maplesoft as it looks like a bug to me.

May be someone can find a workaround so I can use arrows = curve?

Maple 2023.2 on windows 10

 > restart;

 > ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0; x_range:=-0.99 .. 0.99; DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0],arrows = 'curve')

Error, (in DEtools/DEplot/direction) cannot assign a complex value to a hardware float Array

 > restart;

 > ode:=diff(y(x),x)-1/(-x^2+1)^(1/2) = 0; x_range:=-0.99 .. 0.99; DEtools:-DEplot(ode,y(x),x =x_range,y = -1.6 .. 1.6,[y(0) = 0])

 >

## Can Maple dsolve formally this ode?...

I recently answered a question concerning the Lane-Emden equation (see here LaneEmden) where the main topic was about finding its numerical solution.

The generic form of the Lane-Emden equation with parameter n is

```LaneEmden := n -> (Diff(xi^2*(Diff(theta(xi), xi)), xi)) = -theta(xi)^n * xi^2

d   /  2 / d            \\             n   2
n -> ---- |xi  |---- theta(xi)|| = -theta(xi)  xi
dxi \    \ dxi          //
```

I have just realized that I missed a "small" point in the original question: the OP ( @shashi598 ) wrote
"[...] Maple never comes out of evaluating [the] analytical solution when n=5 [...] ".
The important point here is that this solution (at least for some initial conditions) is known and simple (in the sense it doen't involve any special function).

So I tried for a few hours to verify this claim, and ended wondering myself if it might not be right?

Could you please tell me (I guess @shashi598 would be interested too in your return) if the differential equation LaneEmden(5) can be solved formally?
TIA.

Emden_equation.mw

EDITED:
After a little research it seems that very specigic method are used to build the analytic solution of the LaneEmden(n) (n not equal to 0, 1 and 5): serie expansions, homotopy, Adomian decomposition for instance.
I wasn't capable to find how the solution for LaneEmden(5) have been got for the first time (iseems to be atthe end of the 19th century).

## Insert a Matrix in Sum...

Hello everyone,

Can someone help me how to use a Matrix in sum?

Thanks

## how I can find the solution of differential equati...

how I can find the solution of differential equations with dsolve?

Thesis_(1).mw

 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 >
 (5)
 >
 (6)
 >
 >
 >
 >

## improving phaseplot for system of ode's...

Given a system of 2 first order ode's which are autonomous (i.e. the RHS does not explicitly depend on time), one can make phase plot in Maple using DEtools:-DEplot

I am trying to get my Maple output to look like I get with Mathematica. I am getting close, but there are two issues. First, here is what I get in Maple

```restart;

ode1:=diff(x(t),t)=2*x(t)*y(t);
ode2:=diff(y(t),t)=1-x(t)^2-y(t)^2;

DEtools:-DEplot([ode1,ode2],[x(t),y(t)],
t=0..1,x = -4..4, y = -4..4,arrows=curve,linecolor=red,
numpoints =300,arrowsize='magnitude',scene=[x(t),y(t)]);
```

Here is the same thing in Mathematica

```ode1=x'[t]==2*x[t]*y[t]
ode1=y'[t]==1-x[t]^2-y[t]^2

StreamPlot[{2 x*y,1-x^2-y^2},{x,-4,4},{y,-4,4},
```

Is it possible to get the arrows to be stream lines similar to how they show up? Also, the axes labels in Maple are internal and hard to see. Is it possible to have on the outside like above so they are easier to see?

On a side question: Should one use DEtools:-DEplot or DEtools:-phaseportrait I could never understand when to use one vs. the other.

Maple 2023.2 on windows

## How to exclude integer terms that are not a given ...

Once the terms have been selected, as below

I only need to keep terms that contain a certain function with generic arguments, for example, tanh(x), in this case, that is, I want from A01

-(m2/4) tanh(2k-2ç)+(m2/16) tanh(4k+2ç)+-(m2/4) tanh(2k+2ç)+(3m2/8) tanh(2ç)

and delete the terms

3/16-(3/16)m2^2

What's the best command to make that? In other words, always exclude terms that do not accompany tanh

## How to calculate the principal part around 0 of a ...

I am using Maple to compute the principal part around the point 0, which involves obtaining the series expansion terms with strictly negative powers. This is necessary for my work on evaluating infinite integrals that involve complex functions. While I can calculate these expressions manually, I am exploring whether Maple already offers a convenient tool for this purpose. For instance, Maple's built-in Laurent series expansion can be used to obtain the principal part of functions like BesselK(4, x) as 48/x^4 - 4/x^2. Any assistance on this matter is greatly appreciated. Thank you for your help.

## How do I solve elliptic integrals with symbolic in...

I want to solve the following elliptic integral with symbolic inputs a, b, c, and d, and requires a closed-form solution in Legendre's form in terms of these input variables. I want to know how can I solve this using Maple

int(1/sqrt((a - t)(t - b)(t - c)(t - d)), t = b .. a)

Condition: a>t>b>c>d

## solve system of eqs in terms of other variables...

How do I solve sol1 in terms of DC and T (and tau)?

 (5)

Thank you

## How to select the exponential argument and apply i...

For any given function solely and exclusively given by exponentials, as follows (expression A1), I need to select the argument of each exponential and apply it to any function, for example COS(X)

A1 :=  +5

That is, we would have

A1':=+5

I know this result is zero, but this is a simple example. What is the best way to do this?