2

I have the following coming from a computation, $$h_1 (u,v,w) = \frac{1}{v}\partial_v g(u,v,w)$$ and in Mathematica I have different quantities in terms of $h_1$ and its derivatives like $\partial_uh_1$, etc. My problem is to implement the substitution (and analogous ones) in the expressions involving derivatives. Concretely I want to make a rule subst = h1 -> 1/v D[g[u, v, w], v] etc. but, as I was expecting when I try to evaluate D[h1[u, v, w], u] /. subst I get $h_1^{\{0,1,0\}}(u,v,w)$.

Any suggestion?

Reformatting code (thanks to MarcoB) Substitution rules are the following,

rules={h1[u, v, w] -> (1/v)*D[g[u, v, w], v], h2[u, v, w] -> (1/w)*D[g[u, v, w], w]}

then I would like to use the following

ω[1] = reWrite[d[h1] + I*d[φ[1]] - D[h1[u, v, w], u]*(d[u] + I*u*d[φ[3]])]; 
ω[2] = reWrite[d[h2] + I*d[φ[2]] - D[h2[u, v, w], u]*(d[u] + I*u*d[φ[3]])];

and

reWrite[Sum[A[i]*ω[i]*ωb[i], {i, 1, 2}] + A[0]*(ω[1]*ωb[2] + ωb[1]*ω[2])] /. rules
march
  • 23,399
  • 2
  • 44
  • 100
Oscar
  • 203
  • 1
  • 7

0 Answers0