Qurak

Solve a differential equation

How-to 12 stappen, op volgorde uitgevoerd in één sessie. Elke stap is tegen de engine uitgevoerd en de uitvoer hieronder is wat hij opleverde.

Stap 1
DSolve[y'[x] == x, y[x], x]
Uitvoer
{{y[x] -> x^2/2 + C[1]}}
Stap 2
solution = DSolve[y'[x] == x, y[x], x]
Uitvoer
{{y[x] -> x^2/2 + C[1]}}
Stap 3
f[x_] = y[x] /. solution[[1]]
Uitvoer
x^2/2 + C[1]
Stap 4
f[4]
Uitvoer
8 + C[1]
Stap 5
DSolve[{y''[x] == y[x], y[0] == 1, y'[0] == 1}, y[x], x]
Uitvoer
{{y[x] -> E^x}}
Stap 6
DSolve[y''[x] == y[x], y[x], x]
Uitvoer
{{y[x] -> E^x*C[1] + C[2]/E^x}}
Stap 7
DSolve[{y'[x] == z[x], z'[x] == -y[x], y[0] == 0, z[0] == 1}, {y[x], z[x]}, x]
Uitvoer
DSolve[{Derivative[1][y][x] == z[x], Derivative[1][z][x] == -y[x], y[0] == 0, z[0] == 1}, {y[x], z[x]}, x]
Stap 8
DSolve[{x'[s] == Cos[t[s]], y'[s] == Sin[t[s]], t'[s] == s, x[0] == 0, y[0] == 0, t[0] == 0}, {x[s], y[s], t[s]}, s]
Uitvoer
DSolve[{Derivative[1][x][s] == Cos[t[s]], Derivative[1][y][s] == Sin[t[s]], Derivative[1][t][s] == s, x[0] == 0, y[0] == 0, t[0] == 0}, {x[s], y[s], t[s]}, s]
Stap 9
solution  = DSolve[{y''[x] == y[x], y'[0] == 0}, y[x], x]
Uitvoer
{{y[x] -> E^x*C[1] + C[2]/E^x}}
Stap 10
g[x_] = y[x] /. solution[[1]]
Uitvoer
E^x*C[1] + C[2]/E^x
Stap 11
t[x_] = Table[g[x] /. C[1] -> j, {j, 1, 10}]
Uitvoer
{E^x + C[2]/E^x, 2*E^x + C[2]/E^x, 3*E^x + C[2]/E^x, 4*E^x + C[2]/E^x, 5*E^x + C[2]/E^x, 6*E^x + C[2]/E^x, 7*E^x + C[2]/E^x, 8*E^x + C[2]/E^x, 9*E^x + C[2]/E^x, 10*E^x + C[2]/E^x}
Stap 12
Plot[t[x], {x, -2, 2}]
Uitvoer
-Graphics-

Gebruikte functies

Gerelateerde recepten

Alle recepten · Functiereferentie · Gebruik dit vanuit een MCP-client