Qurak

D solve initial and boundary value problems nonlinear ivps and bvps

Tutorial 12 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
LogisticEquation = y'[t] == r(1 - (y[t] / K)) * y[t];

No output - this step sets something up for the next one.

Step 2
DSolve[LogisticEquation, y, t]
Output
{{y -> Function[{t}, C[1]/E^Integrate[-(r*(1 - y[t]/K)), t]]}}
Step 3
DSolve[{LogisticEquation /. {r -> (1 / 2), K -> 4}, y[0] == 1}, y, t]
Output
{{y -> Function[{t}, E^(Integrate[(-1 - -1/4*y[0])/2, 0] - Integrate[(-1 - -1/4*y[t])/2, t])]}}
Step 4
sol = DSolve[{LogisticEquation, y[0] == a * K}, y, t]
Output
{{y -> Function[{t}, a*E^(Integrate[-(r*(1 - y[0]/K)), 0] - Integrate[-(r*(1 - y[t]/K)), t])*K]}}
Step 5
{LogisticEquation, y[0]} /. sol[[1]]//Simplify
Output
{Derivative[1][Function[{t}, a*E^(Integrate[-(r*(1 - y[0]/K)), 0] - Integrate[-(r*(1 - y[t]/K)), t])*K]][t] == -(a^2*E^(2*Integrate[-(r*(1 - y[0]/K)), 0] - 2*Integrate[-(r*(1 - y[t]/K)), t])*K*r) + a*E^(Integrate[-(r*(1 - y[0]/K)), 0] - Integrate[-(r*(1 - y[t]/K)), t])*K*r, a*K}
Step 6
Plot[Evaluate[Table[y[t] /. sol[[1]] /. {K -> 4, a -> i, r -> (1 / 3)}, {i, 2, 1 / 10, -1 / 3}]], {t, 0, 8}, PlotRange -> All]
Output
-Graphics-
Step 7
eqn  = y''[x]  - (1 / 2) * (y'[x] ^ 2 / y[x])  + 1 / (2 * y[x]) == 0;

No output - this step sets something up for the next one.

Step 8
sol = DSolve[{eqn, y[0] == 1, y'[0] == 2}, y, x]
Output
DSolve[{1/(2*y[x]) - Derivative[1][y][x]^2/(2*y[x]) + Derivative[2][y][x] == 0, y[0] == 1, Derivative[1][y][0] == 2}, y, x]
Step 9
{eqn, y[0], y'[0]} /. sol[[1]]//Simplify
Output
{1/(2*y[x]) - Derivative[1][y][x]^2/(2*y[x]) + Derivative[2][y][x] == 0, y[0], Derivative[1][y][0]} /. {1/(2*y[x]) - Derivative[1][y][x]^2/(2*y[x]) + Derivative[2][y][x] == 0, y[0] == 1, Derivative[1][y][0] == 2}
Step 10
generalsolution = DSolve[{y''[x] / 2 == y[x] ^ 3 - y[x]}, y[x], x]
Output
DSolve[{Derivative[2][y][x]/2 == -y[x] + y[x]^3}, y[x], x]
Step 11
(sol = DSolve[{y''[x] / 2 == y[x] ^ 3 - y[x], y[0] == 0, y'[Infinity] == 0}, y[x], x] )//Quiet
Output
DSolve[{Derivative[2][y][x]/2 == -y[x] + y[x]^3, y[0] == 0, Derivative[1][y][Infinity] == 0}, y[x], x]
Step 12
Plot[{y[x] /. sol[[2]], 1}, {x, -2, 2}, PlotRange -> All]
Output
-Graphics-

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client