Basics of Neural Network Programming - More derivatives examples


Let's see more complex examples where the slope of the function can be different at different points of the function.

Figure-1

Figure-1 shows the plot of function f(a)=a^{2}.  Let's look at some points:

  • If a=2, then f(a)=4
    Nudge a slightly to the right, thus a=2.001, then f(a)\approx 4.004
    The slope at point a=2 is \frac{\Delta y}{\Delta a}=\frac{0.004}{0.001}=4
    Formally \frac{df(a)}{da}|_{a=2}=4
  • If a=5, then f(a)=25
    Nudge a slightly to the right, thus a=5.001, then f(a)\approx 25.01
    The slope at point a=5 is \frac{\Delta y}{\Delta a}=\frac{0.01}{0.001}=10
    Formally \frac{df(a)}{da}|_{a=5}=10

So, the mathematical definition is like this:

\frac{df(a)}{da}=\frac{d}{da}f(a)=\frac{d}{da}a^{2}=2a

Another example:

f(a)=a^{3}

Then \frac{d}{da}f(a)=3a^{2}

  • If a=2, then f(a)=8
    Nudge a slightly to a=2.001,
    Because \frac{d}{da}f(a)=12|_{a=2}, it means \Delta f(a)=12\times\Delta a=12\times 0.001=0.012
    then f(a)=8.012

Last example:

f(a)=\ln (a)

Then \frac{d}{da}f(a)=\frac{d}{da}ln(a)=\frac{1}{a}

  • If a=2, then f(a)=ln(a)=ln(2)\approx 0.69315
    When a=2.001, because \frac{d}{da}f(a)=\frac{1}{2}|_{a=2}, it means \Delta f(a)=0.5\times\Delta a=0.5\times 0.001=0.0005
    then f(a)=0.69315+0.0005=0.69365

So, two take aways for this class:

  1. The derivative of a function is just the slope of the function. And the slope of the function can be different at different points
  2. If you look up the derivative of a function, you can flip open your calculus textbook or look at Wikipedia, you can often get a formula for the slope of these functions at different points

<end>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值