Home Page > > Details

BU MET CS-550: Comp. Math. for Data Analytics, v.1.0 Homework: Derivatives

Homework

Problem 1. Plot both the function f(·), its derivative f′(·), and the values of both at point x = 1 on the same plot for each of the following functions (take −3 ≤ x ≤ 3):

1. f(x) = 1 −→ f′(x) = 0

2. f(x) = x −→ f′(x) = 1

3.f(x)=x2 −→f′(x)=2x

4.f(x)=xn −→f′(x)=nxn−1, forn=3 5. f(x) = √x −→ f′(x) = 1/(2√x) 6.f(x)=ex −→f′(x)=ex

7. f(x) = 2x −→ f′(x) = (log a)ax

8. f(x) = logx −→ f′(x) = 1/x

9. f(x) = sinx −→ f′(x) = cos(x)

10. f(x) = cosx −→ f′(x) = −sin(x)

Color curves for f in green and curves for f′ in red, values for f(x = 1) and f′(x = 1) in black.

Page 0

BU MET CS-550: Comp. Math. for Data Analytics, v.1.0 Homework: Derivatives

Problem 2. derive the formulas for the first 4 functions in Problem 1.

Problem 3. read and install the ”sympy” Python package https://scipy-lectures.org/packages/sympy.html

Read the section on calculus (differentiation) and use the ”sympy” Python package to compute derivatives for each function in Problem 1.

Problem 4. for each of 10 functions in problem 1, write a script to compute f′(x = 1) using numerical differentiation with forward, backward and central differences for △x = 0.2. Summarize your results (rounded to 4 decimal digits) in the table as shown. For each row, color the closest value to exact in green and the furthest value in red. Discuss your findings.

Problem 5. for each of 10 functions in problem 1, write a script to compute the relative error (as percentage compared to the exact value) of computing derivatives f′(x = 1 using numerical differentiation with forward, backward and central differences for △x = 0.2. Summarize your results (rounded to 2 decimal digits) in the second table similar to the first one,

Page 1

BU MET CS-550: Comp. Math. for Data Analytics, v.1.0 Homework: Derivatives

Table 1: A Comparison of Derivatives

function

f(x)

1

x x2

···

···

cos(x)

forward

f(x+△x)−f(x) △x

backward

f(x)−f(x−△x) △x

central

f(x+△x)−f(x−△x) 2△x

exact f′(x = 1)

but with relative errors. Examine your table and discuss your findings

Page 2

Contact Us(Ghostwriter Service)

- QQ：99515681
- WeChat：codinghelp
- Email：99515681@qq.com
- Work Time：8:00-23:00

- Help With Ece 380,Help With Java/Pytho... 2023-02-23
- Help With Econ5102,Python/Java Program... 2023-02-23
- Cisc 360Help With ,C/C++ Programminghe... 2023-02-23
- Help With Stat 411,Help With Java/Pyth... 2023-02-22
- Comp90048help With ,Help With Java，C/... 2023-02-22
- Help With Ma1510,Help With C++/Java Pr... 2023-02-21
- Csci561 Programminghelp With ,Help Wit... 2023-02-21
- Econ 178Help With ,Help With R Program... 2023-02-20
- Help With Ecmm461,C/C++ Programminghel... 2023-02-20
- Msmk7021help With ,C++，Python Program... 2023-02-20
- Comp5400help With ,Help With Java/Pyth... 2023-02-20
- Cse214help With ,Help With C/C++，Java... 2023-02-20
- Help With Math5965,Help With R Program... 2023-02-20
- Help With Comp9012,Help With Python Pr... 2023-01-23
- Comp9414: Artificial Intelligence Assi... 2023-01-05
- Comp9444 Assignment 1 Neural Networks ... 2023-01-05
- Final Assignment - Apply All Your Skil... 2023-01-05
- Data7202 Statistical Methods For Data ... 2023-01-04
- Comp307/Aiml420 Assignment 4: Planning... 2023-01-04
- Comp3170 Assignment 3 Moonlit Forest 2023-01-04

Contact Us - Email：99515681@qq.com WeChat：codinghelp

© 2021 www.asgnhelp.com

Programming Assignment Help！