How can I get the output expressed in terms of p1 and p2 instead of exponentials?
gau[x_, v_] := Exp[-(x^2)/(2*v)]/Sqrt[2*Pi*v];
p1[x_] := gau[x - m, B + v]/2 + gau[x + m, B + v]/2;
p2[x_] := gau[x - m, B + v]/2 - gau[x + m, B + v]/2;
Simplify[D[Log[p1[x]], {v, 3}]]
I want to substitute:
Exp[(x+m)^2/(2*(B+v))]/2 + Exp[(x-m)^2/(2*(B+v))]/2 -> p1
Exp[(x+m)^2/(2*(B+v))]/2 - Exp[(x-m)^2/(2*(B+v))]/2 -> p2
but obvious that doesn't work.