# Automatic Differentiation

(Difference between revisions)

Automatic Differentiation enables you to compute both the value of a function at a point and its derivative(s) at the same time.

When using Forward Mode this roughly means that a numerical value is equipped with its derivative with respect to one of your input, which is updated accordingly on every function application. Let the number x0 be equipped with the derivative x1: $\langle x_0,x_1 \rangle$. For example the sinus is defined as:

• $\sin\langle x_0,x_1 \rangle = \langle \sin x_0, x_1\cdot\cos x_0\rangle$

Replacing this single derivative with a lazy list of them can enable you to compute an entire derivative tower at the same time.

However, it becomes more difficult for vector functions, when computing the derivatives in reverse, when computing towers, and/or when trying to minimize the number of computations needed to compute all of the kth partial derivatives of an n-ary function.

Forward mode is suitable when you have fewer arguments than outputs, because it requires multiple applications of the function, one for each input.

Reverse mode is suitable when you have fewer results than inputs, because it requires multiple applications of the function, one for each output.

Implementations:

## 1 Power Series

If you can compute all of the derivatives of a function, you can compute Taylor series from it.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 2, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8690857291221619, "perplexity": 359.05379856804154}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1430456358323.20/warc/CC-MAIN-20150501045918-00097-ip-10-235-10-82.ec2.internal.warc.gz"}