# Replace does not substitute in function

I have the following expression with functions

Ricci11=-(Derivative[1][a12][u]^2/(
a12[u]^2 -
a11[u] a22[u])) - (-((a22[u] Derivative[1][a11][u])/(
2 (a12[u]^2 - a11[u] a22[u]))) + (a12[u] Derivative[1][a12][u])/(
2 (a12[u]^2 - a11[u] a22[u])))^2 + (
Derivative[1][a11][u] Derivative[1][a22][u])/(
a12[u]^2 - a11[u] a22[u]) - (
a22[u] Derivative[1][a11][
u] (-a22[u] Derivative[1][a11][u] +
2 a12[u] Derivative[1][a12][u] - a11[u] Derivative[1][a22][u]))/(
2 (a12[u]^2 - a11[u] a22[u])^2) + (
a12[u] Derivative[1][a12][
u] (-a22[u] Derivative[1][a11][u] +
2 a12[u] Derivative[1][a12][u] -
a11[u] Derivative[1][a22][u]))/(a12[u]^2 - a11[u] a22[u])^2 - (
a11[u] Derivative[1][a22][
u] (-a22[u] Derivative[1][a11][u] +
2 a12[u] Derivative[1][a12][u] - a11[u] Derivative[1][a22][u]))/(
2 (a12[u]^2 - a11[u] a22[u])^2) - ((a12[u] Derivative[1][a12][u])/(
2 (a12[u]^2 - a11[u] a22[u])) - (a11[u] Derivative[1][a22][u])/(
2 (a12[u]^2 - a11[u] a22[u])))^2 -
2 ((a12[u] Derivative[1][a11][u])/(2 (a12[u]^2 - a11[u] a22[u])) - (
a11[u] Derivative[1][a12][u])/(
2 (a12[u]^2 - a11[u] a22[u]))) (-((a22[u] Derivative[1][a12][u])/(
2 (a12[u]^2 - a11[u] a22[u]))) + (a12[u] Derivative[1][a22][u])/(
2 (a12[u]^2 - a11[u] a22[u]))) + (
a22[u] (a11^\[Prime]\[Prime])[u])/(2 (a12[u]^2 - a11[u] a22[u])) - (
a12[u] (a12^\[Prime]\[Prime])[u])/(a12[u]^2 - a11[u] a22[u]) + (
a11[u] (a22^\[Prime]\[Prime])[u])/(2 (a12[u]^2 - a11[u] a22[u]))


and I want to replace parts of it with m[u_] = {{a11[u], a12[u]}, {a12[u], a22[u]}}, for which \[Chi][u_] = (Det[m[u]])^(1/4).

To do that, I typped Ricci11/.(-a12[u]^2+a11[u]a22[u])^(1/4))->\[Chi][u], however, the substitution is not made and the expression stays the same...

• With the definitions you have made \[Chi][u] is identical to (-a12[u]^2 + a11[u] a22[u])^(1/4) so no changes can occur. I am confused as to the expression your are trying to replace and the replacement expression you wish to use. Sep 12, 2019 at 20:22
• Do you want to have \[Chi][u] displayed in the expr? Or (Det[m[u]])^1/4? Sep 18, 2019 at 13:06
I am a bit confused but if you use your definition of Riccil1 and make the replacement without defining m[u_] it would look like the following. First I remove the power to the 1/4 on each side and multiple both sides by negative one.
Ricci11 /. a12[u]^2 - a11[u] a22[u] -> -Det[m[u]]