Message Boards Message Boards

Can't get the particular solution from the general and the complementary

I am not able to get the particular solution of a linear differential equation from the general solution and the particular solution.

Clear[t, x]

ecuación = x''''[t] + 5 x''[t] + 4 == Sin[t] + Cos[2 t]

xc = x''''[t] + 5 x''[t] + 4 == 0

xg = DSolve[ecuación, x[t], t]

xc1 = Solve[x''''[t] + 5 x''[t] + 4 - Sin[t] - Cos[t] == C[1], x[t]]

s2 = xg[[1, 1]]

ip1 = s2 /. x[t] -> x

xc1 = DSolve[xc, x[t], t]

xc2 = Solve[x''''[t] + 5 x''[t] + 4 == C[1], x[t]]

s3 = xc1[[1, 1]]

ip2 = s3 /. x[t] -> x

FullSimplify[ip1 - ip2]

Can somebody help me please

POSTED BY: P. Marrone

I don't quite undestand what you are trying to do. The following

xc1 = Solve[x''''[t] + 5  x''[t] + 4 - Sin[t] - Cos[t] == C[1], x[t]]

gives an empty set because it is not a differential equation and x[t] does not appear in the equation.

To give specific values to the constants you can use a replacement rule:

ecuaciĆ³n = x''''[t] + 5  x''[t] + 4 == Sin[t] + Cos[2  t]
xg = DSolveValue[ecuaciĆ³n, x[t], t]
xg /. {C[1] -> 0, C[2] -> 0, C[3] -> 0, C[4] -> 0}
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract