Lösungen

1

a

Remove["Global`*"];

i

F[x_,y_]:= x^2 y^3 +x -2 y; F[x,y]//TeXForm

Dt[F[x, y]]

Collect[%,{ Dt[x], Dt[y]}]

f[x_,y_]:= Evaluate[D[F[u,y],u]/.u->x]; f[x,y]

g[x_,y_]:= Evaluate[D[F[x,u],u]/.u->y]; g[x,y]

D[f[x,y],y]==D[g[x,y],x]

ii

Solve[F[x,y[x,c]]==c,{y[x,c]}]

solv0= Solve[F[x,y[x,c]]==c,{y[x,c]}][[1]]

q[x_,c_]:=y[x,c] /.solv0;
q[x,c]

Plot[Evaluate[Table[q[x,c],{c,-5,5}]],{x,-10,10}];

iii

y'[x]==-f[x,y[x]]/g[x,y[x]]  (* D'Gl. *)

DSolve[y'[x]==-f[x,y[x]]/g[x,y[x]],y[x],x ]

DSolve[y'[x]==-f[x,y[x]]/g[x,y[x]],y[x],x ][[1]]

solv1=DSolve[y'[x]==-f[x,y[x]]/g[x,y[x]],y[x],x ][[1]]//N

z[x_]:=y[x]/.solv1[[1]]

z[x]/.C[1]->c

Plot[Evaluate[Table[z[x]/.C[1]->c,{c,-5,5}]],{x,-10,10}];

Plot[Evaluate[Table[z[x]/.C[1]->c,{c,-5,5}]],{x,0.2,10}];

(*Gesucht ist nur die reelle Lösung! *)

D[f[x,y],y]==D[g[x,y],x]

b

Remove["Global`*"];

F[x_,y_]:= x^2 y^3 +x -2 y

Dt[F[x, y]]

Collect[%,{ Dt[x], Dt[y]}]

f[x_,y_]:= Evaluate[D[F[u,y]+u*y,u]/.u->x]; f[x,y]

g[x_,y_]:= Evaluate[D[F[x,u],u]/.u->y]; g[x,y]

D[f[x,y],y]==D[g[x,y],x]

c

f[x_,y_]:=- x y^2 + x^3*y^3 + 2*x*y^3; f[x,y]//TeXForm;
g[x_,y_]:= -2 y + 3*x^2*y^2;
(D[f[x,y],y]-D[g[x,y],x])/g[x,y] // Simplify

f[x,y]//TeXForm

g[x,y]//TeXForm

M[x_]:=E^(Integrate[Evaluate[(D[f[x,y],y]-D[g[x,y],x])/g[x,y]],x]);
M[x]

Integrate[InputForm[M[x]]*f[x,y],x]

Integrate[InputForm[M[x]]*g[x,y],y]

Integrate[M[x]*g[x,y],y]//InputForm

Solve[Evaluate[Integrate[InputForm[M[x]]*g[x,y],y]],{y}]

<< Graphics`ImplicitPlot`

Table[ImplicitPlot[ E^(x^2/2)*(-y^2 + x^2*y^3) == k , {x, 1,5}, {y, 0.1,2.5}],{k,0,20,2}];

y'[x]==-f[x,y[x]]/g[x,y[x]]  (* D'Gl. *)

DSolve[y'[x]==-f[x,y[x]]/g[x,y[x]],y[x],x ]

d

solution=NDSolve[{y'[x]==-f[x,y[x]]/g[x,y[x]],y[2]== 1},y,{x,1,5},
    WorkingPrecision->24];Plot[y[x]/.solution,{x,1,5}];

2

a

Remove["Global`*"];
m1[k_,y0_]:=Module[{x,y},
solv = Flatten[
DSolve[{y'[x]+ k y[x]==0, y[0]==y0},y,x]];
y = y/.solv;
Print["k = ",k, " /  y[x] = ",y[x]];
Plot[y[x],{x,-2,2}]];

Table[m1[k,1],{k,-5,5}];

b

i

Remove["Global`*"];
m2[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==0, y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,5}]];

Table[m2[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];

ii

Remove["Global`*"];
m3[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==1, y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,5}]];

Table[m3[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];

iii

Remove["Global`*"];
m4[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==1+ x+ x^2, y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,5}]];

Table[m4[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];

iv

Remove["Global`*"];
m5[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==Cos[2 x-1], y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,5}]];

Table[m5[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];

v

Remove["Global`*"];
m6[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==E^(-x), y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,3}]];

Table[m6[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];

vi

Remove["Global`*"];
m7[k1_,k2_,y0_,y1_]:=Module[{x,y},
solv = 
DSolve[{y''[x]+ k1 y'[x]+ k2 y[x]==1+x+Cos[2 x-1]+E^(-x/5), y[0]==y0, y'[0]==y1},y,x];
y = y/.solv[[1]];
Print["k1 = ",k1,"  k2 = ",k2, " /  y[x] = ",y[x]//Simplify];
Plot[y[x],{x,0,5}]];

Table[m7[k1,k2,1,0],{k1,-3,3},{k2,-3,3}];