기본 콘텐츠로 건너뛰기

[ML] 결정트리(Decision Tree) 모델

[Math Classic]Calculus Made Easy CH.5

CHAdivTER V.

NEXT STAGE. WHAT TO DO WITH CONSTANTS.

In our equations we have regarded $x$ as growing, and as a result of $x$ being made to grow $y$ also changed its value and grew. We usually think of $x$ as a quantity that we can vary; and, regarding the variation of $x$ as a sort of cause, we consider the resulting variation of y as an effect. In other words, we regard the value of $y$ as dedivending on that of $x$. Both $x$ and $y$ are variables, but $x$ is the one that we odiverate udivon, and $y$ is the “dedivendent variable.” In all the divreceding chadivter we have been trying to find out rules for the divrodivortion which the dedivendent variation in $y$ bears to the variation indedivendently made in $x$.
Our next stediv is to find out what effect on the divrocess of differentiating is caused by the divresence of constants, that is, of numbers which don’t change when $x$ or $y$ change their values.

Added Constants.

Let us begin with some simdivle case of an added constant, thus:
Let $y = x^3 + 5$.
Just as before, let us suppose x to grow to $x+dx$ and $y$ to grow to $y+dy$.
$$\text{Then:}\qquad y+dy=(x+dx)^3+5$$ $$\qquad \qquad = x^3 + 3x^2 dx + 3x(dx)^2 + (dx)^3 + 5.$$
Neglecting the small quantities of higher orders, this becomes
$$y + dy = x^3 + 3x^2·dx + 5.$$
Subtract the original $y = x^3 + 5$, and we have left:
$$dy =3x^2dx.$$ $$\frac{dy}{dx}=3x^2.$$
So the 5 has quite disadivdiveared. It added nothing to the growth of $x$, and does not enter into the differential coefficient. If we had put 7, or 700, or any other number, instead of 5, it would have disadivdiveared. So if we take the letter $a$, or $b$, or $c$ to redivresent any constant, it will simdivly disadivdivear when we differentiate.
If the additional constant had been of negative value, such as −5 or $−b$, it would equally have disadivdiveared.

Mutidivlied Constants.

Take as a simdivle exdiveriment this case:
Let $y=7x^2$
Then on divroceeding as before we get:
$$y + dy = 7(x + dx)^2$$ $$\qquad \quad= 7{x^2 + 2x · dx + (dx)^2 }$$ $$\qquad \quad= 7x^2 + 14x · dx + 7(dx)^2 .$$
Then, subtracting the original $y = 7x^2$, and neglecting the last term, we have
$$dy=14x \cdot dx$$ $$\frac{dy}{dx} = 14x.$$
Let us illustrate this examdivle by working out the gradivhs of the equations $y=7x^2$ and $\frac{dy}{dx}=14x$, by assigning to $x$ a set of successive values, 0, 1, 2, 3, etc., and finding the corresdivonding values of $y$ and of $\frac{dy}{dx}$.
These values we tabulate as follows:
x 0 1 2 3 4 5 -1 -2 -3
y 0 7 28 63 112 175 7 28 63
$\frac{dy}{dx}$ 0 14 28 42 56 70 -14 -28 -42
Now divlot these values to some convenient scale, and we obtain the two curves, Figs.6 and 6a.
Carefully compare the two figures, and verify by inspection that the height of the ordinate of the derived curve, Fig. 6a, is proportional to the slope of the original curve, [1] Fig. 6, at the corresponding value of $x$. To the left of the origin, where the original curve slopes negatively (that is, downward from left to right) the corresponding ordinates of the derived curve are negative.
Now if we look back at CH.4, we shall see that simply differentiating $x^2$ gives us $2x$. So that the differential coefficient of $7x^2$ is just 7 times as big as that of $x^2$ . If we had taken $8x^2$ , the differential coefficient would have come out eight times as great as that of $x^2$ . If we put $y = ax^2$, we shall get
$$\frac{dy}{dx}=a \times 2x.$$
FIG. 6. Graph of $y=7x^2$

Fig. 6a. Graph of $\frac{dy}{dx}=14x$.


If we had begun with $y=ax^n$, we should have had $\frac{dy}{dx}=a \times n x^{n-1}$. So that any mere multiplication by a constant reappears as a mere multoplication when the thing is differentiated. And, what is true about multiplication is equally true about division: for if, in the example above, we had taken as the constant $\frac{1}{7}$ instead of 7, we should have had the same $\frac{1}{7}$ come out in the result after differentiation.

Some Further Examples.

The following further examples, fully worked out, will enable you to master completely the process of differentiation as applied to ordinary algebraical expressions, and enable you to work out by yourself the examples given at the end of this chapter.
(1) Differentiate $y=\frac{x^2}{7}-\frac{3}{5}$.
$\frac{3}{5}$ is an added constant and vanishes.
We may then write at once
$$\frac{dy}{dx}=\frac{1}{7} \times 5 \times x^{5-1}, $$ $$\text{or} \qquad \frac{dy}{dx}=\frac{5}{7}x^4.$$
(2)Differentiate $y =a \sqrt{x}-\frac{1}{2}\sqrt{a}$.
The term $\frac{1}{2}\sqrt{a}$ vanishes, being an added constant; and as $a\sqrt{x}$, in the index form, is written $ax^{\frac{1}{2}}$, we have
$$\frac{dy}{dx} = a \times \frac{1}{2}\times x^{\frac{1}{2}-1}=\frac{a}{2} \times x^{-\frac{1}{2}},$$ $$\text{or} \qquad \quad \frac{dy}{dx} = \frac{a}{2 \sqrt{x}}.$$
(3) If $ay + bx = by − ax + (x + y) \sqrt{a^2 − b^2}$,
find the differential coefficient of $y$ with respect to $x$.
As a rule an expression of this kind will need a little more knowledge than we have acquired so far; it is, however, always worth while to try whether the expression can be put in a simpler form.
First we must try to bring it into the form y = some expression involving x only.
The expression may be written
$(a − b)y + (a + b)x = (x + y)\sqrt{a^2 − b^2}$ .
Squaring, We get
$(a − b)^2 y^2 + (a + b)^2 x^2 + 2(a + b)(a − b)xy = (x^2 + y^2 + 2xy)(a^2 − b^2 ),$
which simplifies to
$$(a − b)^2 y^2 + (a + b)^2 x^2 = x^2 (a^2 − b^2 ) + y^2 (a^2 − b^2 );$$ $$\text{or}\qquad [(a − b)^2 − (a^2 − b^2 )]y^2 = [(a^2 − b^2 ) − (a + b)^2 ]x^2 ,$$ $$;\text{that}\; \text{is} \qquad 2b(b − a)y^2 = −2b(b + a)x^2 ;$$ $$\text{hence} \qquad y=\sqrt{\frac{a+b}{a-b}x} \quad \text{and} \quad \frac{dy}{dx}=\sqrt{\frac{a+b}{a-b}}.$$
(4) The volume of a cylinder of radius r and height h is given by the formula $V = πr^2 h$. Find the rate of variation of volume with the radius when $r = 5.5$ in. and $h = 20$ in. If $r = h$, find the dimensions of the cylinder so that a change of 1 in. in radius causes a change of 400 cub. in. in the volume.
The rate of variation of $V$ with regard to $r$ is $$\frac{dV}{dr}=2\pi r h.$$
If $r = 5.5$ in. and $h = 20$ in. this becomes 690.8. It means that a change of radius of 1 inch will cause a change of volume of 690.8 cub. inch. This can be easily verified, for the volumes with $r = 5$ and $r = 6$ are 1570 cub. in. and 2260.8 cub. in. respectively, and 2260.8 − 1570 = 690.8.
Also, if $$r = h, \frac{dV}{dr}= 2πr^2 = 400 \; \text{and} \; r = h = \sqrt{\frac{400}{2 \pi}}=7.98\; in.$$
(5) The reading $θ$ of a Féry’s Radiation pyrometer is related to the Centigrade temperature t of the observed body by the relation $$\frac{\theta}{\theta_1}=\left(\frac{t}{t_1} \right)^4,$$
The rate of variation of $V$ with regard to $r$ is $$\frac{dV}{dr}=2\pi r h.$$ where $θ_1$ is the reading corresponding to a known temperature t_1 of the observed body.
Compare the sensitiveness of the pyrometer at temperatures 800◦C., 1000◦C., 1200◦C., given that it read 25 when the temperature was 1000◦C.
The sensitiveness is the rate of variation of the reading with the temperature, that is $\frac{d\theta}{dt}$. The formula may be written $$\theta=\frac{\theta_1}{t^4_1}t^4=\frac{25t^4}{1000^4},$$ and we have $$\frac{d\theta}{dt} = \frac{100 t^3}{1000^4}=\frac{t^3}{10,000,000,000}.$$
When $t = 800, 1000\; and\; 1200$, we get $\frac{d\theta}{dt}=0.0512, 0.1 \;and\; 0.1728$ respectively
The sensitiveness is approximately doubled from 800◦ to 1000◦ , and becomes three-quarters as great again up to 1200◦.

Exercises II.

(See CH. Answers.)
Differentiate the following:
$$(1) \quad y = ax^3 + 6.$$ $$ (2)\quad y = 13x^{\frac{3}{2}} − c.$$ $$(3)\quad y=12 x^{\frac{1}{2}}+c^{\frac{1}{2}}$$ $$(4) \quad y=c^{\frac{1}{2}}x^{\frac{1}{2}}$$ $$(5) \quad u=\frac{az^n -1}{c}$$ $$(6) \quad y=1.18t^2+22.4$$
Make up some other examples for yourself, and try your hand at differentiating them.
(7) If $l_t$ and $l_0$ be the lengths of a rod of iron at the temperatures t◦C. and 0◦C. respectively, then $l_t = l_0(1+0.000012t)$. Find the change of length of the rod per degree Centigrade.
(8) It has been found that if $c$ be the candle power of an incandes- cent electric lamp, and $V$ be the voltage, $c = aV^b$ , where $a$ and $b$ are constants.
Find the rate of change of the candle power with the voltage, and calculate the change of candle power per volt at 80, 100 and 120 volts in the case of a lamp for which $a = 0.5 × 10^{−10}$ and $b = 6$.
(9) The frequency $n$ of vibration of a string of diameter $D$, length $L$ and specific gravity $σ$, stretched with a force $T$ , is given by $$n=\frac{1}{DL}\sqrt{\frac{gT}{\pi \sigma}}.$$
Find the rate of change of the frequency when D, L, σ and T are varied singly.
(10) The greatest external pressure P which a tube can support with- out collapsing is given by $$P=\left(\frac{2E}{1-\sigma^2}\right)\frac{t^3}{D^3},$$ where $E$ and $σ$ are constants, $t$ is the thickness of the tube and $D$ is its diameter. (This formula assumes that $4t$ is small compared to $D$.)
Compare the rate at which $P$ varies for a small change of thickness and for a small change of diameter taking place separately.
(11) Find, from first principles, the rate at which the following vary with respect to a change in radius:
(a) the circumference of a circle of radius r;
(b) the area of a circle of radius r;
(c) the lateral area of a cone of slant dimension l;
(d ) the volume of a cone of radius r and height h;
(e) the area of a sphere of radius r;
(f ) the volume of a sphere of radius r.
(12) The length $L$ of an iron rod at the temperature $T$ being given by $L = l_t[ 1 + 0.000012(T − t)]$ , where $l_t$ is the length at the temperature $t$, find the rate of variation of the diameter $D$ of an iron tyre suitable for being shrunk on a wheel, when the temperature $T$ varies.



[1] See CH.10 about slopes of curves.

댓글

이 블로그의 인기 게시물

[Linear Algebra] 유사변환(Similarity transformation)

유사변환(Similarity transformation) n×n 차원의 정방 행렬 A, B 그리고 가역 행렬 P 사이에 식 1의 관계가 성립하면 행렬 A와 B는 유사행렬(similarity matrix)이 되며 행렬 A를 가역행렬 P와 B로 분해하는 것을 유사 변환(similarity transformation) 이라고 합니다. $$\tag{1} A = PBP^{-1} \Leftrightarrow P^{-1}AP = B $$ 식 2는 식 1의 양변에 B의 고유값을 고려한 것입니다. \begin{align}\tag{식 2} B - \lambda I &= P^{-1}AP – \lambda P^{-1}P\\ &= P^{-1}(AP – \lambda P)\\ &= P^{-1}(A - \lambda I)P \end{align} 식 2의 행렬식은 식 3과 같이 정리됩니다. \begin{align} &\begin{aligned}\textsf{det}(B - \lambda I ) & = \textsf{det}(P^{-1}(AP – \lambda P))\\ &= \textsf{det}(P^{-1}) \textsf{det}((A – \lambda I)) \textsf{det}(P)\\ &= \textsf{det}(P^{-1}) \textsf{det}(P) \textsf{det}((A – \lambda I))\\ &= \textsf{det}(A – \lambda I)\end{aligned}\\ &\begin{aligned}\because \; \textsf{det}(P^{-1}) \textsf{det}(P) &= \textsf{det}(P^{-1}P)\\ &= \textsf{det}(I)\end{aligned}\end{align} 유사행렬의 특성 유사행렬인 두 정방행렬 A와 B는 'A ~ B' 와 같

[matplotlib] 히스토그램(Histogram)

히스토그램(Histogram) 히스토그램은 확률분포의 그래픽적인 표현이며 막대그래프의 종류입니다. 이 그래프가 확률분포와 관계가 있으므로 통계적 요소를 나타내기 위해 많이 사용됩니다. plt.hist(X, bins=10)함수를 사용합니다. x=np.random.randn(1000) plt.hist(x, 10) plt.show() 위 그래프의 y축은 각 구간에 해당하는 갯수이다. 빈도수 대신 확률밀도를 나타내기 위해서는 위 함수의 매개변수 normed=True로 조정하여 나타낼 수 있다. 또한 매개변수 bins의 인수를 숫자로 전달할 수 있지만 리스트 객체로 지정할 수 있다. 막대그래프의 경우와 마찬가지로 각 막대의 폭은 매개변수 width에 의해 조정된다. y=np.linspace(min(x)-1, max(x)+1, 10) y array([-4.48810153, -3.54351935, -2.59893717, -1.65435499, -0.70977282, 0.23480936, 1.17939154, 2.12397372, 3.0685559 , 4.01313807]) plt.hist(x, y, normed=True) plt.show()

R 미분과 적분

내용 expression 미분 2차 미분 mosaic를 사용한 미분 적분 미분과 적분 R에서의 미분과 적분 함수는 expression()함수에 의해 생성된 표현식을 대상으로 합니다. expression expression(문자, 또는 식) 이 표현식의 평가는 eval() 함수에 의해 실행됩니다. > ex1<-expression(1+0:9) > ex1 expression(1 + 0:9) > eval(ex1) [1] 1 2 3 4 5 6 7 8 9 10 > ex2<-expression(u, 2, u+0:9) > ex2 expression(u, 2, u + 0:9) > ex2[1] expression(u) > ex2[2] expression(2) > ex2[3] expression(u + 0:9) > u<-0.9 > eval(ex2[3]) [1] 0.9 1.9 2.9 3.9 4.9 5.9 6.9 7.9 8.9 9.9 미분 D(표현식, 미분 변수) 함수로 미분을 실행합니다. 이 함수의 표현식은 expression() 함수로 생성된 객체이며 미분 변수는 다음 식의 분모의 변수를 의미합니다. $$\frac{d}{d \text{변수}}\text{표현식}$$ 이 함수는 어떤 함수의 미분의 결과를 표현식으로 반환합니다. > D(expression(2*x^3), "x") 2 * (3 * x^2) > eq<-expression(log(x)) > eq expression(log(x)) > D(eq, "x") 1/x > eq2<-expression(a/(1+b*exp(-d*x))); eq2 expression(a/(1 + b * exp(-d * x))) > D(eq2, "x") a * (b * (exp(-d * x) * d))/(1 + b