I want to substitute functions and their derivatives in this:
{LXi = x*D[Xi[2][t], t] + Sqrt[x] h[t],
Xi[2][t]}; LPhi = { (p[t] + f[x, t]) u + g[x, t]};
f[x, t] =
C[1][t] + ((-((4 k \[Theta] h[t])/Sqrt[x]) +
6 Sqrt[x] (k h[t] + 2 Derivative[1][h][t]) +
6 x (k Derivative[1][Xi[2]][t] + (Xi[2]^\[Prime]\[Prime])[t]))/(
8 k \[Theta]))
Is this correct?
{LXi, LPhi} =
ReplaceAll[{LXi = {x*D[Xi[2][t], t] + Sqrt[x] h[t], Xi[2][t]},
LPhi = { (p[t] +
1/(8 k \[Theta]) (-(1/Sqrt[x]) 4 k \[Theta] h[t] +
6 Sqrt[x] (k (*h[t]*)+ 2 D[h[t], t]) +
6 x (k D[Xi[2][t], t] + D[Xi[2][t], {t, 2}]))) u +
g[x, t]}}, {h[t] ->
E^((Sqrt[k] t Sqrt[3 k + 8 \[Theta]])/(2 Sqrt[3])) C[1] +
E^(-((Sqrt[k] t Sqrt[3 k + 8 \[Theta]])/(2 Sqrt[3]))) C[2],
p[t] -> C[3] - (
3 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-3 k +
3 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) k - 8 \[Theta] +
8 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) \[Theta] +
Sqrt[3] Sqrt[k (3 k + 8 \[Theta])] +
Sqrt[3] E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) Sqrt[
k (3 k + 8 \[Theta])]) C[5])/(8 (3 k + 8 \[Theta])) - (
3 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (3 Sqrt[3] k +
3 Sqrt[3] E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) k +
8 Sqrt[3] \[Theta] +
8 Sqrt[3] E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3]) \[Theta] - 3 Sqrt[k (3 k + 8 \[Theta])] +
3 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) Sqrt[
k (3 k + 8 \[Theta])]) C[6])/(
8 (3 k + 8 \[Theta]) Sqrt[k (3 k + 8 \[Theta])]),
Xi[2][t] ->
C[4] + (Sqrt[3]
E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((2 t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3])) C[
5])/(2 Sqrt[k (3 k + 8 \[Theta])]) + (
3 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]))^2 C[
6])/(2 k (3 k + 8 \[Theta])),
D[h[t], t] -> (
E^((Sqrt[k] t Sqrt[3 k + 8 \[Theta]])/(2 Sqrt[3])) Sqrt[k]
Sqrt[3 k + 8 \[Theta]] C[1])/(2 Sqrt[3]) - (
E^(-((Sqrt[k] t Sqrt[3 k + 8 \[Theta]])/(2 Sqrt[3]))) Sqrt[k]
Sqrt[3 k + 8 \[Theta]] C[2])/(2 Sqrt[3]) ,
D[Xi[2][t], t] ->
E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) C[5] -
1/2 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((2 t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3])) C[
5] + (
Sqrt[3] (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3])) Sqrt[
k (3 k + 8 \[Theta])] C[6])/(k (3 k + 8 \[Theta])) - (
Sqrt[3] E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3]))^2 Sqrt[k (3 k + 8 \[Theta])] C[6])/(
2 k (3 k + 8 \[Theta])),
D[Xi[2][t], {t, 2}] -> (
2 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3])
k (3 k + 8 \[Theta]) C[5])/(
Sqrt[3] Sqrt[k (3 k + 8 \[Theta])]) + (
E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((2 t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) k (3 k + 8 \[Theta]) C[5])/(
2 Sqrt[3] Sqrt[k (3 k + 8 \[Theta])]) - (
2 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3]) Sqrt[
k (3 k + 8 \[Theta])] C[5])/Sqrt[
3] + ((-2 (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) k (3 k + 8 \[Theta]) +
1/2 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3]))^2 k (3 k + 8 \[Theta]) +
3/2 E^(-((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) (2/3 E^((2 t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[3])
k (3 k + 8 \[Theta]) +
2/3 E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3]) (-1 + E^((t Sqrt[k (3 k + 8 \[Theta])])/Sqrt[
3])) k (3 k + 8 \[Theta]))) C[6])/(
k (3 k + 8 \[Theta]))
Please show a generic way of substitution if possible, without having to manually find their derivatives first before substitution.