How can I vary an initial condition in the numerical solution of a system of ODEs and then make a 3D plot of the solution space with that condition as one of the variables.
sol = NDSolve[
{y''[t] + y'[t] + 4*y[t] + x[t] - x'[t] == 0,
x'[t] + 3*c*y[t] == 0,
y[1] == 1, y'[1] == 1,
x[0] == 1}, {x, y}, {t, 0, 10}]
I want to vary one of the condition variables, say y[1]
over u = Range[-10, 10, step]
. Then I want to make a 3D plot of the solution space (x[t[, y[t], y[1][u])
.
Can anyone please guide me in solving this query.
y[1]==1
withy[1]==z
andDSolve
the equation andPlot3D[x[t] /. sol, {t, -1, 1}, {z, -1, 1}]
. $\endgroup$ParametricNDSolve
and see if that helps. $\endgroup$NDSolve
this is it; automatic sensitivity computation. It's pretty cool, I think. Also a much betterEvent
language and better DAE solving capabilities, are just a few highlights of V9 NDSolve. Hope that's enough of a teaser... $\endgroup$