# Testing if a specific expression is a solution for ordinary differential equation [closed]

I would like to know what is the full command details of wanting to test if a specific expression is a solution for ordinary differential equation (without using DSolve).

-

## closed as unclear what you're asking by Artes, bobthechemist, Yves Klett, Simon Woods, Michael E2Jan 28 at 23:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

ODE[f[x]] /. f :> yourExpression[x] –  belisarius Jan 28 at 19:07
@belisarius Nice pseudocode, but very easy to misinterpret. A beginner may be tempted to think that ODE is a Mathematica function. –  Sjoerd C. de Vries Jan 28 at 19:26
@SjoerdC.deVries Isn't it? Damn ... I've to check my docs again! Thanks! –  belisarius Jan 28 at 19:33
@belisarius check the documents? Psssh, I bet you stop at gas stations to ask for directions as well. –  bobthechemist Jan 28 at 19:39
@bobthechemist Hey! Aren't you the short, fat, drunken guy that made me end up at the landfill on Chicago last month? –  belisarius Jan 28 at 19:43

You can define your differential equation:

diffEquations = y'[x] + y[x] == a Sin[x]


Define a function to try for y:

y[x_] := E^-x C[1] + 1/2 a (-Cos[x] + Sin[x])
(*Result to test*)


And simplify:

FullSimplify[diffEquations]
(*True*)

-