1
$\begingroup$

How can I automatically obtain the characteristic equation of a second-order differential equation given any expression?

Assuming a second-order differential equation is given as follows:

x''[t] + x'[t] + 16 x[t] == 0
$\endgroup$

1 Answer 1

3
$\begingroup$

Your equation has wrong syntax. x^\[Prime]\[Prime]) should be written like: x'' (not back ticks and no superscript). Then we can get the characteristic equation by:

eq = x''[t] + Derivative[1][x][t] + 16 x[t] == 0;
eq /. {x[t] -> 1, x'[t] -> x, x''[t] -> x^2}

16 + x + x^2 == 0
$\endgroup$
3
  • $\begingroup$ Sir, thank you for your answer! Your answer has helped me. And I have corrected my expression writing in the original problem. $\endgroup$
    – chen chen
    Commented May 4, 2023 at 7:42
  • 2
    $\begingroup$ Or, if higher derivatives are present {x[t] -> 1, Derivative[n_][x][t] :> x^n} $\endgroup$
    – rhermans
    Commented May 4, 2023 at 8:10
  • $\begingroup$ @rhermansr Yep, thanks for your inspired ideas. $\endgroup$
    – chen chen
    Commented May 4, 2023 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.