MOOCULUS微积分-2: 数列与级数学习笔记 7. Taylor series

时间:2021-07-15 08:04:24

此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授。

PDF格式教材下载 Sequences and Series

本系列学习笔记PDF下载(Academia.edu) MOOCULUS-2 Solution

Summary

  • Given a function $f$, the series $$\sum_{n=0}^\infty {f^{(n)}(0)\over n!}x^n$$ is called the Maclaurin series for $f$, or often just the Taylor series for $f$ centered around zero.
  • Given a function $f$, the series $$\sum_{n=0}^\infty {f^{(n)}(c)\over n!}(x-c)^n$$ is called the Taylor series for $f$ centered around $c$.
  • Taylor's Theorem
    Suppose that $f$ is defined on some open interval $I = (a-R,a+R)$ around $a$ and suppose the function $f$ is $(N+1)$-times differentiable on $I$, meaning that $f^{(N+1)}(x)$ exists for $x\in I$. Then for each $x \neq a$ in $I$ there is a value $z$ between $x$ and $a$ so that $$f(x) = \sum_{n=0}^N {f^{(n)}(a)\over n!}\,(x-a)^n + {f^{(N+1)}(z)\over (N+1)!}(x-a)^{N+1}.$$
  • Common functions: $$e^x=\sum_{n=0}^{\infty}{1\over n!}x^n=1+x+{x^2\over2!}+{x^3\over3!}+\cdots\cdots,\ \text{for all}\ x$$ $${1\over1-x}=\sum_{n=0}^{\infty}x^n=1+x+x^2+x^3+\cdots\cdots,\ \ \text{for}\ |x| < 1$$ $$\log(1+x)=\sum_{n=1}^{\infty}{(-1)^{n-1}\over n}x^n=x-{1\over2}x^2+{1\over3}x^3+\cdots\cdots,\ \ \text{for}\ -1 < x \leq 1$$ $$\sin x=\sum_{n=0}^{\infty}{(-1)^n\over(2n+1)!}x^{2n+1}=x-{x^3\over3!}+{x^5\over5!} +\cdots\cdots,\ \text{for all}\ x$$ $$\cos x=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{2n}=1-{x^2\over2!}+{x^4\over4!} +\cdots\cdots,\ \text{for all}\ x$$

Exercises 7.1

For each function, find the Taylor series centered at $c$, and the radius of convergence.

1. $\cos x$ around $c = 0$  

Solution: $$f(0)=\cos x\big|_{x=0}=1$$ $$f'(0)=-\sin x\big|_{x=0}=0$$ $$f''(0)=-\cos x\big|_{x=0}=-1$$ $$f'''(0)=\sin x\big|_{x=0}=0$$ $$f^{(4)}(0)=\cos x\big|_{x=0}=1$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\cos x=1-{1\over2!}x^2+{1\over4!}x^4+\cdots=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{2n}$$ And the radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{(2n)!\over(2n+2)!}=\lim_{n\to\infty}{1\over(2n+2)(2n+1)}=0$$ Thus $R=\infty$.

2. $e^x$ around $c = 0$  

Solution: $$f(0)=e^x\big|_{x=0}=1$$ $$f'(0)=e^x\big|_{x=0}=1$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$e^x=1+x+{1\over2!}x^2+\cdots=\sum_{n=0}^{\infty}{x^n\over n!}$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{n!\over(n+1)!}=\lim_{n\to\infty}{1\over n+1}=0$$ Thus $R=\infty$.

3. $1/x$ around $c=5$  

Solution: $$f(5)={1\over x}\big|_{x=5}={1\over5}$$ $$f'(5)=-{1\over x^2}\big|_{x=5}=-{1\over25}$$ $$f''(5)={2\over x^3}\big|_{x=5}={2\over125}$$ $$f'''(5)={-6\over x^4}\big|_{x=5}={-6\over625}$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $${1\over x}={1\over5}-{1\over25}(x-5)+{1\over125}(x-5)^2-{1\over625}(x-5)^3+\cdots=\sum_{n=0}^{\infty}{(-1)^n\over5^{n+1}}(x-5)^n$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{5^{n+1}\over5^{n+2}}={1\over5}$$ Thus $R=5$.

4. $\log x$ around $c=1$  

Solution: $$f(1)=\log x\big|_{x=1}=0$$ $$f'(1)={1\over x}\big|_{x=1}=1$$ $$f''(1)={-1\over x^2}\big|_{x=1}=-1$$ $$f'''(1)={2\over x^3}\big|_{x=1}=2$$ $$f^{(4)}(1)={-6\over x^4}\big|_{x=1}=-6$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\log x=(x-1)-{1\over2}(x-1)^2+{1\over3}(x-1)^3-{1\over4}(x-1)^4+\cdots=\sum_{n=1}^{\infty}{(-1)^{n-1}\over n}(x-1)^n$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{n\over n+1}=1$$ Thus $R=1$.

5. $\log x$ around $c=2$  

Solution: $$f(2)=\log x\big|_{x=2}=\log2$$ $$f'(2)={1\over x}\big|_{x=2}={1\over2}$$ $$f''(2)={-1\over x^2}\big|_{x=2}=-{1\over4}$$ $$f'''(2)={2\over x^3}\big|_{x=2}={1\over4}$$ $$f^{(4)}(2)={-6\over x^4}\big|_{x=2}=-{3\over8}$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\log x=\log2+{1\over2}(x-2)-{1\over8}(x-2)^2+{1\over24}(x-2)^3-{1\over64}(x-2)^4\cdots=\log2+\sum_{n=1}^\infty {(-1)^{n-1}\over n\cdot2^n}(x-2)^n$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{n\cdot2^n\over(n+1)\cdot2^{n+1}}={1\over2}$$ Thus $R=2$.

6. $1/x^2$ around $c=1$  

Solution: $$f(1)={1\over x^2}\big|_{x=1}=1$$ $$f'(1)={-2\over x^3}\big|_{x=1}=-2$$ $$f''(1)={6\over x^4}\big|_{x=1}=6$$ $$f'''(1)={-24\over x^5}\big|_{x=1}=-24$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $${1\over x^2}=1-2(x-1)+3(x-1)^2-4(x-1)^3+\cdots=\sum_{n=0}^{\infty}(-1)^n(n+1)(x-1)^n$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{n+2\over n+1}=1$$ Thus $R=1$.

7. $1/\sqrt{1-x}$ around $c = 0$

Solution: $$f(0)=(1-x)^{-{1\over2}}\big|_{x=0}=1$$ $$f'(0)={1\over2}(1-x)^{-{3\over2}}\big|_{x=0}={1\over2}$$ $$f''(0)={3\over4}(1-x)^{-{5\over2}}\big|_{x=0}={3\over4}={1\cdot3\over2^2}$$ $$f'''(0)={15\over8}(1-x)^{-{7\over2}}\big|_{x=0}={15\over8}={1\cdot3\cdot5\over2^3}$$ $$f^{(4)}(0)={105\over16}(1-x)^{-{9\over2}}\big|_{x=0}={105\over16}={1\cdot3\cdot5\cdot7\over2^4}$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $${1\over\sqrt{1-x}}=1+{1\over2}x+{3\over8}x^2+{5\over16}x^3 +{35\over128}x^4+\cdots=1+\sum_{n=1}^{\infty}{1\cdot3\cdot5\cdots\cdot(2n-1)\over2^n\cdot n!}x^n$$ $$=1+\sum_{n=1}^{\infty}{(2n-1)!\over2^n\cdot n!\cdot2\cdot4\cdots\cdot(2n-2)}x^n$$ $$=1+\sum_{n=1}^{\infty}{(2n-1)!\over2^{2n-1}\cdot n!\cdot(n-1)!}x^n$$ The radius of convergence is $${1\over R}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|}=\lim_{n\to\infty}{(2n+1)!\over2^{2n+1}\cdot(n+1)!\cdot n!}\cdot{2^{2n-1}\cdot n!\cdot(n-1)!\over(2n-1)!}=\lim_{n\to\infty}{(2n+1)\cdot2n\over4\cdot(n+1)n}=1$$ Thus $R=1$.

8. Find the first four terms of the Taylor series for $\tan x$ centered at zero. By "first four terms" I mean up to and including the $x^3$ term.

Solution: $$f(0)=\tan x\big|_{x=0}=0$$ $$f'(0)=\sec^2 x\big|_{x=0}=1$$ $$f''(0)=2\sec^2 x\cdot\tan x\big|_{x=0}=0$$ $$f'''(0)=2\cdot(2\sec x\cdot\tan x\cdot\sec x\cdot\tan x+\sec^2 x\cdot\sec^2 x)\big|_{x=0}=2$$ Thus the first four terms are $$\tan x=x+{x^3\over3}$$

9. Use a combination of Taylor series and algebraic manipulation to find a series centered at zero for $x\cos (x^2)$.  

Solution:

We know $$\cos x=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{2n}$$ So $$\cos x^2=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{4n}$$ Thus $$x\cos x^2=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{4n+1}$$

10. Use a combination of Taylor series and algebraic manipulation to find a series centered at zero for $xe^{-x}$.

Solution:

We know $$e^x=\sum_{n=0}^{\infty}{x^n\over n!}$$ So $$e^{-x}=\sum_{n=0}^{\infty}{(-1)^n\over n!}x^n$$ Thus $$xe^{-x}=\sum_{n=0}^{\infty}{(-1)^n\over n!}x^{n+1}$$

Exercises 7.2

1. Find a polynomial approximation for $\cos x$ on $[0,\pi]$, accurate to $\pm 10^{-3}$.

Solution:

By Taylor's theorem, we have $$\cos x=\sum_{n=0}^N {f^{(n)}(a)\over n!}\,x^n +R_n(x)$$ where $R_n(x)={f^{(N+1)}(z)\over (N+1)!}x^{N+1}$. So we have $$|R_n(x)|=\big|{f^{(N+1)}(z)\over (N+1)!}x^{N+1}\big| < 0.001$$ Since $|f^{(N+1)}(z)|\leq1$ and $x\in [0, \pi]$, we have $$\big|{x^{N+1}\over(N+1)!}\big|\leq\big|{{\pi}^{N+1}\over(N+1)!}\big| < 0.001$$ Computing in R:

f = function(x) pi^(x + 1) / factorial(x + 1)
for (i in 0:100) {
if (f(i) < 1 / 1000) {
print(i)
break
}
}
# [1] 12

That is, the polynomial approximation is $$\cos x=1-{x^2\over2}+{x^4\over24}- {x^6\over720}+\cdots+{x^{12}\over12!}$$

2. How many terms of the series for $\log x$ centered at 1 are required so that the guaranteed error on $[1/2,3/2]$ is at most $10^{-3}$? What if the interval is instead $[1,3/2]$?

Solution:

First, calculate the Taylor series of $\log x$ centered at 1: $$f(1)=\log x\big|_{x=1}=0$$ $$f'(1)={1\over x}\big|_{x=1}=1$$ $$f''(1)={-1\over x^2}\big|_{x=1}=-1$$ $$f'''(1)={2\over x^3}\big|_{x=1}=2$$ $$f^{(4)}(1)={-6\over x^4}\big|_{x=1}=-6$$ $$\cdots\cdots\cdots$$ $$f^{(n)}(1)={(-1)^{n-1}\cdot(n-1)!\over x^n}\big|_{x=1}=(-1)^{n-1}\cdot(n-1)!$$ Thus $$\log x=\sum_{n=1}^{\infty}{(-1)^{n-1}\over n}(x-1)^n$$ By Taylor's theorem, we have $$R_{n}(x)=\big|{f^{(N+1)}(z)\over(N+1)!}(x-1)^{N+1}\big| < 0.001$$ where $x\in[{1\over2},{3\over2}]$, so $x-1\in[-{1\over2}, {1\over2}]$, we hope to maximize $R_n(x)$, that is $$R_n(x) \leq \big|{(-1)^{N}\cdot N!\over(N+1)!\cdot ({1\over2})^{N+1}}\cdot({1\over2})^{N+1}\big|={1\over N+1} < 0.001\Rightarrow N=1000$$ If the interval is $[1, {3\over2}]$, similarly we have $x-1\in[0, {1\over2}]$, and $$R_n(x) \leq \big|{(-1)^{N}\cdot N!\over(N+1)!\cdot 1^{N+1}}\cdot({1\over2})^{N+1}\big|={({1\over2})^{N+1}\over N+1} < 0.001\Rightarrow N=7$$ R code:

f = function(x) 0.5^(x + 1) / (x + 1)
for (i in 0:1e7) {
if (f(i) < 0.001) {
print(i)
break
}
}
# [1] 7

3. Find the first three nonzero terms in the Taylor series for $\tan x$ on $[-\pi/4,\pi/4]$, and compute the guaranteed error term as given by Taylor's theorem. (You may want to use Sage or a similar aid.)

Solution: $$f(x)=\tan x\big|_{x=0}=0$$ $$f'(x)=\sec^2 x\big|_{x=0}=1$$ $$f''(x)=2\tan x\sec^2 x\big|_{x=0}=0$$ $$f'''(x)=2\sec^4x+4\tan^2x\sec^2x\big|_{x=0}=2$$ $$f^{(4)}(x)=16\tan x\sec^4x+8\tan^3x\sec^2x\big|_{x=0}=0$$ $$f^{(5)}(x)=16\sec^6x+64\tan^2x\sec^4x+24\tan^2x\sec^4x+16\tan^4x\sec^2x\big|_{x=0}=16$$ Additionally, we need to calculate the $7^{\text{th}}$ derivative of $\tan x$: $$f^{(6)}(x)=272\sec^6x\tan x+416\sec^4x\tan^3x+ 32\sec^2x\tan^5x$$ $$f^{(7)}(x)=272\sec^8x+2880\tan^2x\sec^6x +1824\tan^4x\sec^4x+64\tan^6x\sec^2x$$ Thus the Taylor series is $$\tan x=x+{x^3\over3}+{2x^5\over15}+R_{n}(x)$$ where $R_n(x)={f^{(N+1)}(z)\over(N+1)!}x^{N+1}$. Since $x\in[-{\pi\over4}, {\pi\over4}]$, and both of $\tan x$ and $\sec x$ are increasing on $[0, {\pi\over4}]$. We have $$R_n(x) \leq \big|{f^{(7)}({\pi\over4})\over7!}\cdot({\pi\over4})^7\big|={34816\over7!}\cdot({\pi\over4})^7\doteq1.273437$$ Thus the error is $\pm1.273437$.

4. Prove: For all real numbers $x$, $$\cos x = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n}$$

Solution:

By Taylor's theorem, we have $$\cos x=\sum_{n=0}^{N}{f^{(n)}(0)\over n!}x^n+R_n(x)$$ where $R_n(x)={f^{(N+1)}(z)\over(N+1)!}x^{N+1}$. We need to prove that $$\lim_{n\to\infty}R_n(x)=0$$ Since the derivative of $\cos x$ is no larger than 1. So $$\big|R_n(x)\big|=\big|{f^{(N+1)}(z)\over(N+1)!}x^{N+1}\big|\leq\big|{x^{N+1}\over(N+1)!}\big|$$ And $$\lim_{n\to\infty}{d^n\over n!}=0$$ for any $d$ since $\sum_{n=0}^{\infty}{x^n\over n!}$ converges for all $x$ (by ratio test can obtain that $1/R=0$). Thus the right hand of the above inequality converges to 0 when $N$ is closing to $\infty$. That is $$\lim_{n\to\infty}R_n(x)=0$$ Therefore, $\cos x$ is euqal to its Taylor series: $$\cos x = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n}$$

5. Prove: For all real numbers $x$, $$e^x = \sum_{n=0}^\infty \frac{1}{n!} x^{n}$$

Solution:

This proof is quite similar to the above one. We also need to prove that $$\lim_{n\to\infty}R_n(x)=0$$ where $$\big|R_n(x)\big|=\big|{e^{N+1}\over(N+1)!}x^{N+1}\big|$$ Note that the right hand converges to 0 when $N$ is closing to $\infty$. Thus $$e^x = \sum_{n=0}^\infty \frac{1}{n!} x^{n}$$

Additional Exercises

1. Find the first four terms of Taylor series for $$f(x)=e^{\tan x}-1$$ centered at $a=0$.

Solution: $$f(0)=e^{\tan x}-1\big|_{x=0}=0$$ $$f'(0)=e^{\tan x}\cdot\sec^2x\big|_{x=0}=1$$ $$f''(0)=e^{\tan x}\cdot(\sec^4x+2\sec^2x\tan x)\big|_{x=0}=1$$ $$f'''(0)=4e^{\tan x}\sec^2x\tan^2x+6e^{\tan x}\sec^4x\tan x+e^{\tan x}\sec^6x+2e^{\tan x}\sec^4x\big|_{x=0}=3$$ Thus its Taylor series is $$0+x+{1\over2}x^2+{1\over2}x^3+\cdots$$

2. By finding the Taylor series around x=2, rewrite the polynomial $p(x) = -4 \, x^{3} - 3 \, x^{2} - 3 \, x - 1$ as a polynomial in $x-2$.

Solution: $$p(2)=-4x^3-3x^2-3x-1\big|_{x=2}=-51$$ $$p'(2)=-12x^2-6x-3\big|_{x=2}=-63$$ $$p''(2)=-24x-6\big|_{x=2}=-54$$ $$p'''(2)=-24\big|_{x=2}=-24$$ Thus its Taylor series is $$p(x)=p(2)+{p'(2)\over1}(x-2)+{p''(2)\over2!}(x-2)^2+{p'''(2)\over3!}(x-2)^3$$ $$=-51-63(x-2)-27(x-2)^2-4(x-2)^3$$

3. By considering Taylor series, evaluate $$\lim_{x \to 0} \displaystyle\frac{{\left(\sin\left(3 \, x\right) + \tan\left(3 \, x\right)\right)}^{2}}{{\left(e^{x} - 1\right)} \log\left(x + 1\right)}.$$

Solution: $$\sin3x=3x-{27x^3\over6}+O(x^5)$$ $$\tan3x=3x+9x^3+O(x^5)$$ $$e^x-1=x+{x^2\over2}+{x^3\over6}+O(x^4)$$ $$\log(x+1)=x-{1\over2}x^2+{1\over3}x^3+O(x^4)$$ So plug in the above results we have $$\lim_{x \to 0} f(x)=\lim_{x\to0}{(6x+{9\over2}x^3+O(x^5))^2\over (x+{x^2\over2}+{x^3\over6}+O(x^4))(x-{1\over2}x^2+{1\over3}x^3+O(x^4))}=\lim_{x\to0}{36x^2+O(x^4)\over x^2+O(x^3)}=36$$

4. Estimate $\sin1$ within $1/40$.

Solution: $$\sin x=\sum_{n=0}^{N}{(-1)^n\over(2n+1)!}x^{2n+1}+R_{n}(x)=x-{1\over3!}x^3+{1\over5!}x^5+\cdots+R_{n}(x)$$ $$\Rightarrow \big|R_n(x)\big|=\big|{f^{(N+1)}(z)\over(2N+3)!}x^{2N+3}\big|\leq{x^{2N+3}\over(2N+3)!}={1\over(2N+3)!}\leq{1\over40}$$ Thus $N=1$ is enough. And the estimation is $$\sin1=1-{1\over3!}={5\over6}$$

5. Consider the polynomial $p(x) = 16 \, x^{5} - 20 \, x^{3} + 5 \, x$. Use the Taylor series for $\cos x$ to find a Taylor series for $f(x) = p(\cos x)$ around the point $x=0$ (up to $x^2$ term).

Solution: $$\cos x=\sum_{n=0}^{\infty}{(-1)^n\over(2n)!}x^{2n}=1-{x^2\over2}+{x^4\over4!}+\cdots$$ $$\Rightarrow p(\cos x)=16(1-{x^2\over2}+O(x^4))^5-20(1-{x^2\over2}+O(x^4))^3 +5(1-{x^2\over2}+O(x^4)$$ $$=16(1-{5\over2}x^2+O(x^4))-20(1-{3\over2}x^2+O(x^4)) +5-{5\over2}x^2+O(x^4)$$ $$=1-{25\over2}x^2+O(x^4)$$

MOOCULUS微积分-2: 数列与级数学习笔记 7. Taylor series的更多相关文章

  1. MOOCULUS微积分-2&colon; 数列与级数学习笔记 6&period; Power series

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  2. MOOCULUS微积分-2&colon; 数列与级数学习笔记 4&period; Alternating series

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  3. MOOCULUS微积分-2&colon; 数列与级数学习笔记 Review and Final

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  4. MOOCULUS微积分-2&colon; 数列与级数学习笔记 5&period; Another comparison test

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  5. MOOCULUS微积分-2&colon; 数列与级数学习笔记 3&period; Convergence tests

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  6. MOOCULUS微积分-2&colon; 数列与级数学习笔记 2&period; Series

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  7. MOOCULUS微积分-2&colon; 数列与级数学习笔记 1&period; Sequences

    此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授. PDF格式教材下载 ...

  8. python学习笔记—DataFrame和Series的排序

    更多大数据分析.建模等内容请关注公众号<bigdatamodeling> ################################### 排序 ################## ...

  9. 《Java学习笔记&lpar;第8版&rpar;》学习指导

    <Java学习笔记(第8版)>学习指导 目录 图书简况 学习指导 第一章 Java平台概论 第二章 从JDK到IDE 第三章 基础语法 第四章 认识对象 第五章 对象封装 第六章 继承与多 ...

随机推荐

  1. 【repost】JS原型与原型链终极详解

    一. 普通对象与函数对象  JavaScript 中,万物皆对象!但对象也是有区别的.分为普通对象和函数对象,Object ,Function 是JS自带的函数对象.下面举例说明 function f ...

  2. flume中的agent配置和启动

    首先创建一个文件example.conf(touch example.conf) 然后在文件中,进行agent文件的如下的配置(vi  example.conf)   agent文件的配置:(配置ag ...

  3. 网页提示&lbrack;Not allowed to load local resource&colon; file&colon;&sol;&sol;XXXX&rsqb;错误

    网页通过http 访问时, 点击打开文件的link.在Chrome 中会报 Not allowed to load local resource: file// XXXX 的错误 <!--Add ...

  4. Openvswitch原理与代码分析&lpar;6&rpar;:用户态流表flow table的操作

    当内核无法查找到流表项的时候,则会通过upcall来调用用户态ovs-vswtichd中的flow table. 会调用ofproto-dpif-upcall.c中的udpif_upcall_hand ...

  5. hdu 3047 Zjnu Stadium(加权并查集)2009 Multi-University Training Contest 14

    题意: 有一个运动场,运动场的坐席是环形的,有1~300共300列座位,每列按有无限个座位计算T_T. 输入: 有多组输入样例,每组样例首行包含两个正整数n, m.分别表示共有n个人,m次操作. 接下 ...

  6. Linux lspci查看硬件设备

    Linux 主机的硬件配备 lspci 找到的是眼下主机上面的硬件配备 [root@www ~]# lspci [-vvn] 选项与參数: -v     :显示很多其它的 PCI 接口装置的具体信息 ...

  7. 生成JSON数据--Gson(谷歌)方法

    Gson生成JSON数据方法: 创建相应的类,然后创建对象,toJson()进去就可以了 要求:生成如下JSON数据 1.{"age":4,"name":&qu ...

  8. ztree 获取根节点

    function getRoot() { var treeObj = $.fn.zTree.getZTreeObj("tree-div"); //返回一个根节点 var node ...

  9. Java中浮点数的精度问题 【转】

    当您在计算Money的时候,请看好了!!!要不损失了别后悔!!! 现象1: public static void main(String[] args) { System.out.println(0. ...

  10. 从ASP&period;NET Core2&period;2到3&period;0你可能会遇到这些问题

    趁着假期的时间所以想重新学习下微软的官方文档来巩固下基础知识.我们都知道微软目前已经发布了.NET Core3.0的第三个预览版,同时我家里的电脑也安装了vs2019.So,就用vs2019+.NET ...