3 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/

I am trying to compose three functions in the following manner:

Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want and get the answer as in the last line of code.

I have also looked at this questionthis question, it, too, suffers from the same problem.

I am trying to compose three functions in the following manner:

Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want and get the answer as in the last line of code.

I have also looked at this question, it, too, suffers from the same problem.

I am trying to compose three functions in the following manner:

Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want and get the answer as in the last line of code.

I have also looked at this question, it, too, suffers from the same problem.

2 tried to make question clearer.

# Composing puremultiple functions

I am trying to compose three functions in the following manner:

z[{x_, t_}] = z[x, t]
Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

z[x, t]
1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want and get the answer as in the last line of code. I

I have also looked at this question, it, too, suffers from the same problem.

# Composing pure functions

I am trying to compose three functions in the following manner:

z[{x_, t_}] = z[x, t]
Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

z[x, t]
1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want. I have also looked at this question, it, too, suffers from the same problem.

# Composing multiple functions

I am trying to compose three functions in the following manner:

Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want and get the answer as in the last line of code.

I have also looked at this question, it, too, suffers from the same problem.

Post Closed as "unclear what you're asking" by Dr. belisarius, dr.blochwave, MarcoB, user9660, Sjoerd C. de Vries
1

# Composing pure functions

I am trying to compose three functions in the following manner:

z[{x_, t_}] = z[x, t]
Adx[z_] = (z[x + dx, t] + z[x, t])/2
Ddt[z_] = (z[x, t + dt] - z[x, t])/dt


I get the following output:

z[x, t]
1/2 (z[x, t] + z[dx + x, t])
(-z[x, t] + z[x, dt + t])/dt
(-(1/2 (z[x, t] + z[dx + x, t]))[x, t] + (1/2 (z[x, t] + z[dx + x, t]))[x, dt + t])/dt


I was expecting

(-(1/2 (z[x, t] + z[dx + x, t])) + (1/2 (z[x, dt+ t] + z[dx + x, dt+ t])))/dt


I want to be able to compose the two functions Adx and Ddtin any order I want. I have also looked at this question, it, too, suffers from the same problem.