# Empty parametric plot for ODE

I'm trying to design a parametric plot to model the effects of changing parameters on this ODE, but the plot keeps coming up completely empty. Any ideas about what's going on?

Thanks!

sol = DSolve[{y'[x] == y[x] (i p - r - i y[x])}, y[x], x]

With[{expr = {y[t]} /. sol},
Manipulate[
ParametricPlot[expr, {t, 0, 5},
PlotRange -> {{0, 100}, {0, 100}}], {{p, 0}, 0, 50}, {{i, 0}, 0,
50}, {{r, 0}, 0, 50}]]


edit:added copyable code

• Please use copyable code instead of posting an image. Commented Aug 11, 2017 at 15:00
• edited in copyable code Commented Aug 11, 2017 at 15:06
• ParametricPlot[] is intended for parametric equations, and you do not have a parametric equation. Also, you give no initial conditions for your DE, so it can't evaluate to a number and thus be plotted. Commented Aug 11, 2017 at 15:08
• Darn. I know how to put in initial conditions, but do you have any advice on what type of plot I should use? I basically just want to visually compare the effects of changing the parameters. This could be in the form of many lines, or a parametric plot like this, or something I haven't thought of yet. Thanks! Commented Aug 11, 2017 at 15:12
• Have you tried Plot[]? Commented Aug 11, 2017 at 15:16

## 1 Answer

Based on J.M. remarks, and adding the constant C[1], which depends on the initial condition, as a variable alpha, this should do what you are looking for:

(* note the use of DSolveValue instead of DSolve, and the replacement rule *)
sol = DSolveValue[{y'[x] == y[x] (i p - r - i y[x])}, y[x], x] /. C[1] -> alpha
expr[p_, i_, r_, alpha_] := Evaluate@sol

Manipulate[
Plot[expr[p, i, r, alpha], {x, 0, 5}, PlotRange -> Full],
{{p, 0}, 0, 50}, {{i, 0}, 0, 50}, {{r, 0}, 0, 50}, {alpha, -10, 10}
]