Plotting an NDSolve solution as a function of a parameter?

Hello everyone,

I am trying to plot a function that is comprised of solutions from both NDSolve and NIntegrate versus one of the function’s parameters (g). I am receiving several errors and was wondering if anyone could help me or tell me what I am trying is even possible.

Thank you,

Alex

test 2.nb (69.1 KB)

You give no value to g.

g is the parameter. I am hoping to plot the function against.

Numerical solutions require numerical input so g has to have a numerical value. You can try using DSolve to get an analytic solution.

As said NDSolve needs g to be a number.

so define a function around your code that takes g as input.

Then run the code for various values of g ( using plot with long evaluating functions usually gives problems).

Then return your plots and plot the function as a function of g.

test 3.nb (17.3 KB)

Thank you so much!