Einführung in Mathematica II

Differenzieren und Integrieren

© Jürgen Schnack, 2010/04/13

Differenzieren I

f[x_]=Sin[2*x];

df[x_]=D[f[x],x]

(∂_x)f[x]

Differenzieren II

Plot[{f[x],df[x]},{x,0,10},PlotStyle->{{Red,Thick},{Green,Thick}},BaseStyle->{FontFamily->Helvetica,FontSize->18}]

Differenzieren III

h[x_]=Sin[2*Cos[x]];

dh[x_]=D[h[x],x]

Differenzieren IV

g[x_,y_]=Sin[x]*Cos[y];

dgx[x_,y_]=D[g[x,y],x]

dgy[x_,y_]=D[g[x,y],y]

dgxy[x_,y_]=D[g[x,y],x,y]

Differenzieren V - Gradient

ϕ[x_,y_,z_]=(1/(Sqrt[ (x^2)+(y^2)+(z^2) ]));

dϕx[x_,y_,z_]=D[ϕ[x,y,z],x]

dϕy[x_,y_,z_]=D[ϕ[x,y,z],y]

dϕz[x_,y_,z_]=D[ϕ[x,y,z],z]

Differenzieren VI - Gradient

Needs["VectorAnalysis`"]

ϕ2=(1/(Sqrt[ (Xx^2)+(Yy^2)+(Zz^2) ]));

Grad[ϕ2]

Das Ergebnis ist ein Feld (Table, Array).

Integrieren I

f[x_]=Sin[2*x];

intf[x_]=Integrate[f[x],x]

∫f[x]\[DifferentialD]x

Integrieren II

intf1=Integrate[f[x],{x,0,π}]

Multiple integral with x integration outermost:

Integrate[Sin[x y],{x,0,1},{y,0,x}]

(∫_0^1)(∫_0^x)Sin[x y]\[DifferentialD]y\[DifferentialD]x

Integrieren III

Integrate[Exp[-c (x^2)],{x,-∞,∞}]

Integrate[Exp[-c (x^2)],{x,-∞,∞},Assumptions->Re[c]≤0]

Integrate[Exp[-c (x^2)],{x,-∞,∞},Assumptions->Re[c]<0]

Integrieren IV

I1=Integrate[Exp[-2 (x^2)],{x,0,10}]

N[I1]

I2=NIntegrate[Exp[-2 (x^2)],{x,0,10}]

I2=NIntegrate[Exp[-2 (x^2)],{x,0,10},MaxRecursion->100]

Integrieren V

Use Green's theorem to find the area of a parametrically defined two-dimensional region:

x[t_]:=Cos[t]+1/7Cos[7t+Pi/3]; 
y[t_]:=Sin[t]+1/7Sin[7t]; 
ParametricPlot[{x[t], y[t]}, {t, 0, 2π}]

NIntegrate[x[t]D[y[t],t],{t,0,2π}]

NIntegrate[y[t]D[x[t],t],{t,0,2π}]

Integrieren VI

NIntegrate[Sin[x^-1],{x,.001,10}]

NIntegrate[Sin[x^-1],{x,.001,10},MaxRecursion->20]

NIntegrate[Sin[x^-1],{x,.001,10},PrecisionGoal->12,MaxRecursion->50]