4 years, 83 days

## Numerical sol. of a diff equation as an ...

Maple

Hello,

I have two ordiary differential equations to be solved numerically. One of the equations can be solved independently (no need to solve the 2nd differential equation). However, in order to solve the 2nd differential equation, I need the numerical solution from the 1st one.

sol1:=dsolve({ode1,x(0)=x__0, D(x)(0)=x__1},numeric, x(t), parameters=[a,b,c])

sol1(parameters=[4,5,1])

Now, I need to solve the 2nd differential equation which will give me y(t), but the differential equation depends on the function of x(t). What is the syntax of dsolve which incorporates the solution of another differential equation?

## Function of function...

Maple

Hello,

How one would define a function of a function-- a functional?

Given

`f(g(r)) := int(g(r), r)`

I would like to get

`int(h(r+eps),r)`

when I call it like

`f(h(r+eps))`

I could achieve this behaviour by substitions, but is there a nicer and shorter way of doing this?

## Assume with subindexed variables (with/w...

Maple

Hello,

I was trying to simplify an expression using assume. However, I ended up with very long evaluation time and got an error: "Error, (in type/complex) too many levels of recursion". Here is the case:

Consider the following code:

```restart:with(Physics):
simplify(csgn(a-b),assume=[a::real,b::real, a>0,b>0,a>b])
```

this gives 1 as expected.

However, if I run the following code:

```restart:with(Physics):
simplify(csgn(a-b[2]),assume=[a::real,b[2]::real, a>0,b[2]>0,a>b[2]])```

I get an error ""Error, (in type/complex) too many levels of recursion" after along evaluation. The last condition a>b[2] is causing the along evaluation time. Without it I get, of course, signum(a-b[2]), which is fine.

If I do these tests without Physics package loaded, I get the result 1 immediately in both cases without any problem. So, something in Physics package is causing this problem.

What is the problem? and how can I resolve this issue?

## subs of the function exp...

Maple

Hello,

I wanted to substitute exp(a) with p in an expression of the form exp(-a).

`subs(exp(a)=p,exp(-a))`

This threw back exp(-a) to me. I was expecting

`exp(-a)->1/exp(a)->1/p`

Is there a way to do that with subs? (a some mystical option perhaps?)

## VectorCalculus:-PositionVector: Componen...

Maple

Hello,

I am little confused about the help file regarding the VectorCalculus:-PositionVector function.

In the help file the first argument "comps" is defined as
"list(algebraic); specify the components of the position Vector"

In spherical coordinates, the position vector is

`r e_r`

So, if the position vector to be entered is given in terms of the components (in spherical coordinates), the VectorCalculus:-PositionVector function should be called as

`VectorCalculus:-PositionVector([r,0,0],spherical)`

But this returns

`[0,0,r]`

(in the cartesian frame). This would make sense if r coordinates is r, theta coordinate is 0 and phi coordinate is 0.

However, if I call it as

```VectorCalculus:-PositionVector([a,b,c],spherical)
```

Then I end up with

`[a*sin(b)*cos(c),a*sin(b)*sin(c),a*cos(b)]`

Thus, the "components" given in PositionVector are not the components but the coordinates r=a, theta=b, and phi=c.

Am I missing something here or the help file is misleading?