# How to plot the product of the NDSolve result and any known function

How can I plot the product of the NDSolve result, e.g. x[t]/.solution and any known function, for instance, Sin[x]?

-

In the examples you find:

Plot[Evaluate[y[t] /. s], {t, 0, 30}, PlotRange -> All]


Expand it like this for the product with Sin[t]:

Plot[Evaluate[y[t] /. s] * Sin[t], {t, 0, 30}, PlotRange -> All]

-

If you meant Sin[x], then I suppose something like

 Plot[Evaluate[Sin[x[t]] /. solution], {t, 0, 20}]


is what you're after. In this case, the term "product" should be read as "composition."

If, on the other hand, you meant to multiply the solution by Sin[t], then perhaps

Plot[Evaluate[Sin[t] x[t] /. solution], {t, 0, 20}]


will do. (Evaluate has to be the Head of the argument for it to override the HoldAll attribute of Plot.)

-