Beruflich Dokumente
Kultur Dokumente
Solve[x ^ 2 - 4 x + 5 ⩵ 0, x]
{{x → 2 - ⅈ}, {x → 2 + ⅈ}}
i = 1;
i = 1;
a := i ^ 2
Do[Print[a], {i, 1, 5}]
1
16
25
Clear[a]
2 sablitehai.nb
{a, b, c, d, e, f}
Sort[{a, b, w, e, r, t, y, u, z, j, k, l, q, o, p, v, n, m, j, t}]
{a, b, e, j, j, k, l, m, n, o, p, q, r, t, t, u, v, w, y, z}
f[x_] := x ^ 3;
f[x] := x ^ 3;
Clear
Clear
i
1
a
a
Clear[f, x]
f[x] := x ^ 3;
Clear[x]
sablitehai.nb 3
Clear[z, x]
Inte
Inte
Clear[g]
clear[z, x]
clear[z, x]
Clear[z, x, g]
Clear[f, x, y]
Clear[g, y]
Clear[f, x, y, g]
{f[a, b, c]}
{f[a, b, c]}
ClearSystemCache
ClearSystemCache
clear[f, x, u, y, g]
clear[f, x, u, y, g]
u[x_] := x ^ 2 x - 2;
1
c[i_] := u[y] * Cos[i * Pi * y] ⅆ y;
-1
1
s[k_] := u[z] * Sin[k * Pi * z] ⅆ z;
-1
1.0
0.5
-0.5
-1.0
-0.2
-0.4
-0.6
-0.8
-1.0
-0.2
-0.4
-0.6
-0.8
-1.0
c[1]
4 CosIntegral[π] - CosIntegral[3 π]
6 sablitehai.nb
N[4 - Log[81]]
- 0.394449
u[1]
-1
ffourier[1]
- 0.449415
1
N u[p] * Cos[Pi * p] ⅆ p
-1
0.252191
0.25219083632470174`
0.252191
ffour
4 Cos[π x] CosIntegral[π] - CosIntegral[3 π] +
1 4 - Log[81] + Sin[π x] 2 - 4 SinIntegral[π] + 4 SinIntegral[3 π]
2 π
ffourier2[n_] :=
c[0] 2 + Sumc[i] * Cos[i * Pi * x], {i, n} + Sums[i] * Sin[i * Pi * x], {i, n}
ffourier2[1]
4 Cos[π x] CosIntegral[π] - CosIntegral[3 π] +
1 4 - Log[81] + Sin[π x] 2 - 4 SinIntegral[π] + 4 SinIntegral[3 π]
2 π
-0.2
-0.4
-0.6
-0.8
-1.0
t = ffourier2[30]
4 Cos[π x] CosIntegral[π] - CosIntegral[3 π] +
4 Cos[2 π x] CosIntegral[2 π] - CosIntegral[6 π] +
4 Cos[3 π x] CosIntegral[3 π] - CosIntegral[9 π] +
sablitehai.nb 7
sum
0
n=2
ff
ff
ffourier2[10]
clear;
ff[x_] = x ^ 2 x - 2;
cc = Range[20];
ss = Range[20];
1
Docc[[i]] = ff[x] Cos[i * Pi * x] ⅆ x, {i, 20};
-1
sablitehai.nb 9
1
Doss[[i]] = ff[x] Sin[i * Pi * x] ⅆ x, {i, 20};
-1
1
cc[[0]] = ff[x] ⅆ x;
-1
20
fFourier = cc[[0]] 2 + cc[[i]] * Cos[i * Pi * x] + ss[[i]] * Sin[i * Pi * x];
i=1
-0.2
-0.4
-0.6
-0.8
-1.0
MatrixForm[m]
a b
c d
Transpose[m]
{{a, c}, {b, d}}
MatrixForm[Transpose[m]]
a c
b d
MatrixForm[Inverse[m]]
d b
- -b c+a
-b c+a d d
c
- -b c+a a
d -b c+a d
m^2
a2 , b2 , c2 , d2
10 sablitehai.nb
Det[m]
-b c + a d
Eigenvalues[mm]
1 9 + 105 , 1 9 - 105 , 0
2 2
Eigen
Eigen
Eigenvectors[mm]
det[m]
det[{{a, b}, {c, d}}]
det[mm]
det[MatrixForm[mm]]
1 2 3
det 2 3 4
3 4 5
Det[mm]
0
MatrixForm[Inverse[mm]]
mm ^ 3
{{1, 8, 27}, {8, 27, 64}, {27, 64, 125}}
Det[mm ^ 3]
- 756
MatrixForm[mm]
1 2 3
2 3 4
3 4 5
j
sablitehai.nb 11
MatrixForm[Inverse[mm ^ 2]]
31 - 11 17
8 2 8
- 11
2
7 - 52
17 - 52 7
8 8
PositiveDefiniteMatrixQ[mm]
False
Linea
Linea
In[96]:= ClearAll["Global`*"]
u[x_] = c0 + c1 * x + c2 * x ^ 2 + c3 * x ^ 3;
- u ''1 5 - u1 5 + 1 5 ^ 2
1 - c0 - c1 - 51 c2 - 151 c3
25 5 25 125
u[0]
c0
u '[1]
c1 + 2 c2 + 3 c3
- u ''1 2 - u1 2 + 1 2 ^ 2
1 - c0 - c1 - 9 c2 - 25 c3
4 2 4 8
- u ''1 4 - u1 4 + 1 4 ^ 2
1 - c0 - c1 - 33 c2 - 97 c3
16 4 16 64
b = 0, 1, - 1 4, - 1 16;
LinearSolve[m, b]
0, - 7 , - 13 , 88
93 217 651
poly = LinearSolve[m, b]
0, 583 , - 29 , - 8
405 405 81
12 sablitehai.nb
poly[1]
0, - 7 , - 13 , 88 [1]
93 217 651
poly[[1]]
0
Plo
Plo
1.2
1.0
0.8
0.6
0.4
0.2
In[1]:= ClearAll["Global`*"]
f[u_] = + u;
In[74]:= g[x_] := x ^ 2;
1
In[76]:= x 2 - x * k ''[x] + k[x] - g[x] ⅆ x
0
Out[76]=
7 - 4 c1 - 17 c2
60 5 90
7 4 c1 17 c2
- -
60 5 90
1
In[77]:= x ^ 2 1 - 2 * x 3 * k ''[x] + k[x] - g[x] ⅆ x
0
Out[77]=
1 - 17 c1 - 29 c2
36 90 315
1
2 ′′
In[20]:= 2 - x x - x + u_bar + u_bar ⅆ x
0
1
2 ′′
Out[20]= 2 - x x - x + u_bar + u_bar ⅆ x
0
In[43]:= u_bar[2]
In[55]:= k ''
In[56]:= g ''
Out[56]= 2&
In[58]:= g '[x]
Out[58]= 2x
Out[78]= 623 , 21
4306 4306
2.0
1.5
Out[95]=
1.0
0.5
In[112]:= ClearAll["Global`*"]
In[113]:= n1[x_] = 1 - 2 x;
In[114]:= n2[x_] = 2 x;
In[101]:= u '[x]
Out[101]= - 2 u1 + 2 u2
In[102]:= n1 '[x]
Out[102]= -2
0.5
In[103]:= n1 '[x] * u '[x] - n1[x] * u[x] + n1[x] * x ^ 2 ⅆ x
0
0.5
In[104]:= n2 '[x] * u '[x] - n2[x] * u[x] + n2[x] * x ^ 2 ⅆ x
0
In[107]:= LinearSolve[m, b]
{0.0859929747397016`, 0.08067382526029823`}
In[116]:= u1 = 0.0859929747397016;
u2 = 0.08067382526029823;
sablitehai.nb 15
0.085
0.084
Out[118]=
0.083
0.082
0.081
In[119]:= u[x]
Out[119]= 0.085993 1 - 2 x + 0.161348 x
In[120]:= n3[x_] = 2 - 2 x;
In[121]:= n4[x_] = 2 x - 1;
1
In[124]:= n3 '[x] * unext '[x] - n3[x] * unext[x] + n3[x] * x ^ 2 ⅆ x
0.5
1
In[125]:= n4 '[x] * unext '[x] - n4[x] * unext[x] + n4[x] * x ^ 2 ⅆ x
0.5
In[134]:= MatrixForm[m]
Out[134]//MatrixForm=
1.83333 - 2.08333
- 2.08333 1.83333
In[135]:= MatrixForm[m1]
Out[135]//MatrixForm=
1.83333 - 2.08333
- 2.08333 1.83333
In[131]:= m
Out[131]= m
16 sablitehai.nb