11-2
a.$y=ASin(\theta-\frac{\pi}{2})$
y=A*sin(th-pi/2)
y
−Acos(๐)
dydth=y.diff(th)
dydth
Asin(๐)
b.$y=sin^2(\theta)$
y.diff(th)
2sin(๐)cos(๐)
c.$y=sin(2\theta)$
y.diff(th)
2cos(2๐)
d.$y=sin^3(\theta)$
y.diff(th)
3sin2(๐)cos(๐)
e.$y=sin(3\theta)$
y.diff(th)
3cos(3๐)
11-2
sin(ฮธ)·cos(ฮธ)๊ฐ ๊ทน๋๊ฐ ๋๋ ฮธ๋ฅผ ๋ฐ๊ฒฌํ์์ค.
y=sin(theta)*cos(theta)
dy=diff(y, theta)
dy
−sin2(ฮธ)+cos2(ฮธ)
m=solve(dy)
m
[-3*pi/4, -pi/4, pi/4, 3*pi/4]
ddy=diff(y, theta, 2)
ddy
−4sin(ฮธ)cos(ฮธ)
sign={}
for i in sol:
sign[i]=dy2dth.subs(th, i)
sign
{-3*pi/4: -2, -pi/4: 2, pi/4: -2, 3*pi/4: 2}
print(f'์ต๋๊ฐ: {y.subs(th, pi/4)}')
์ต๋๊ฐ: 1/2
print(f'์ต์๊ฐ: {y.subs(th, 3*pi/4)}')
์ต์๊ฐ: -1/2
11-3
y=cos(2*pi*n*t)/(2*pi)
y
$\frac{\cos{\left(2 \pi n t \right)}}{2 \pi}$
y.diff(t)
$- n \sin{\left(2 \pi n t \right)}$
11-4
a, x=symbols("a, x")
y=sin(a**x)
y
sin(ax)
y.diff(x)
axlog(a)cos(ax)
11-5
y=log(cos(x))
y
log(cos(x))
y.diff(x)
$−\frac{sin(x)}{cos(x)}
u=symbols('u')
u1=cos(x)
v=log(u)
dudx=u1.diff(x)
dudx
−sin(x)
dvdu=v.diff(u)
dvdu
$\frac{1}{u}$
dvdu=dvdu.subs(u, u1)
dvdu
$\frac{1}{cos(x)}$
dvdx=dvdu*dudx
dvdx
$−\frac{sin(x)}{cos(x)}$
11-6
y=18.2*sin(x+26)
y
18.2sin(x+26)
y.diff(x)
18.2cos(x+26)
11-7
y = 100sin(ฮธ − 15°)์ ๊ทธ๋ํ๋ฅผ ์์ฑํ๊ณ ฮธ=75°์์ ์ต๋ ๊ธฐ์ธ๊ธฐ์ ์ ๋ฐ์์ ๋ณด์ด์์ค.
sympy ๋ฑ python์์ ์ฌ์ฉ๋๋ ์ผ๊ฐํจ์์ ๊ด๋ จ๋ ๋๋ถ๋ถ์ ํจ์๋ ๊ฐ๋(degree)๊ฐ ์๋ ๋ผ๋์(radian)์ด ์ ์ฉ๋ฉ๋๋ค. ๊ทธ๋ฌ๋ฏ๋ก ์ด ๋ฌธ์ ์ ๊ฐ๋๋ฅผ ๋ผ๋์์ผ๋ก ์ ํํ์ฌ์ผ ํฉ๋๋ค.
a, b
(0.2617993877991494, 1.3089969389957472)
th=symbols('theta')
y=100*sin(th-a)
y
100sin(ฮธ−0.261799387799149)
#๋ฌธ์ ๋ ๊ทธ๋ํ์ ๊ธฐ์ธ๊ธฐ์ ๋ํ ๊ฒ์ด๋ฏ๋ก sl์ด ๊ธฐ์ค์ด ๋ฉ๋๋ค.
sl=y.diff(th)
sl
100cos(ฮธ−0.261799387799149)
sol=solve(sl.diff(th), th)
sol
[0.261799387799149, 3.40339204138894]
dsl2dth=sl.diff(th, 2)
sign={}
val={}
for i in sol:
sign[i]=dsl2dth.subs(th, i)
val[i]=sl.subs(th, i)
sign
{0.261799387799149: -100.000000000000, 3.40339204138894: 100.000000000000}
val
{0.261799387799149: 100.000000000000, 3.40339204138894: -100.000000000000}
sl.subs(th, b)#75๋์์์ ๊ธฐ์ธ๊ธฐ: ์ต๋ 100์ ๋ฐ
50.0
11-8
y=sin(th)*cos(2*th)
y
sin(ฮธ)cos(2ฮธ)
y.diff(th)
−2sin(ฮธ)sin(2ฮธ)+cos(ฮธ)cos(2ฮธ)
11-9
y=a*tan(th**n)**m
y
$a \tan^{m}{\left(\theta^{n} \right)}$
y.diff(th)
$\frac{a m n \theta^{n} \left(\tan^{2}{\left(\theta^{n} \right)} + 1\right) \tan^{m}{\left(\theta^{n} \right)}}{\theta \tan{\left(\theta^{n} \right)}}$
11_11
a
y=a*x/(x+b)
y
$\frac{a x}{b + x}$
dydx=y.diff(x)
dydx
$- \frac{a x}{\left(b + x\right)^{2}} + \frac{a}{b + x}$
simplify(dydx)
$\frac{ab}{(b+x)^2}$
์ ๋ฏธ๋ถ๊ณ์์ ํํ์์ ์ ์ ์๋ฏ์ด 0๊ฐ ๋๋ ๊ทน์ ์ ์กด์ฌํ์ง ์์ต๋๋ค. ๊ทธ๋ฌ๋ฏ๋ก ๊ทน๋๊ฐ, ๊ทน์๊ฐ์ ์กด์ฌํ์ง ์์ผ๋ฉฐ x=30์์์ ๋ฏธ๋ถ๊ณ์๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
solve(dydx, x)[]
simplify(dydx.subs(x, 30))
$\frac{a b}{\left(b + 30\right)^{2}}$
b
y=a*(1-exp(-x/b))
y
๐(1−๐−๐ฅ๐)
dydx=y.diff(x)
dydx
๐๐−๐ฅ๐๐
solve(dydx, x)
[]
dydx.subs(x, 30)
๐๐−30๐๐
c
y=a/90*atan(b/x)
y
$\frac{a \operatorname{atan}{\left(\frac{b}{x} \right)}}{90}$
dydx=y.diff(x)
dydx
$- \frac{a b}{90 x^{2} \left(\frac{b^{2}}{x^{2}} + 1\right)}$
solve(dydx, x)
[]
dydx.subs(x, 30)
$- \frac{a b}{81000 \left(\frac{b^{2}}{900} + 1\right)}$
15
y=th*cos(th)
y
$\theta \cos{\left(\theta \right)}$
dydth=y.diff(th)
dydth
$- \theta \sin{\left(\theta \right)} + \cos{\left(\theta \right)}$
sol=solveset(dydth, th, Interval(-pi, pi))
sol
$\left\{\theta \mid \theta \in \left[- \pi, \pi\right] \wedge - \theta \sin{\left(\theta \right)} + \cos{\left(\theta \right)} = 0 \right\}$
์ ๊ฒฐ๊ณผ๋ก๋ถํฐ ๋ฏธ๋ถ๊ณ์๊ฐ 0์ด๋๋ ์กฐ๊ฑด์ $cot(\theta)=\theta$ ์ ๋๋ค. ๋ค์์ ์ด ์๊ณผ ๋ฏธ๋ถ ์์ ๊ทธ๋ํ์ ๋๋ค.
๋๊ธ ์์:
๋๊ธ ์ฐ๊ธฐ