If I use /. only x[t] is getting replaced, but x''[t] is not getting replaced.

```
input:= deqn = D[x[t], t, t] + 2 x[t]
output= 2 x[t] + x''[t]
input:= deqn2 = deqn /. x[t] -> Cos[t]
output= 2 Cos[t] + x''[t]

```

Kindly help me in correcting any mistake I am making.