Skip to content

Commit

Permalink
Change derivative in comments to use prime symbol.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrogoyski committed Sep 8, 2016
1 parent ae04047 commit f94ecfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FivePointFormula extends NumericalDifferentiation
* - If the 3rd point is our $target, use the Midpoint Formula:
*
* 1 h⁴
* f'(x₀) = - [f(x₀-2h)-8f(x₀-h)+8f(x₀+h)-f(x₀+2h)] - - f⁽⁵⁾(ζ₁)
* f(x₀) = - [f(x₀-2h)-8f(x₀-h)+8f(x₀+h)-f(x₀+2h)] - - f⁽⁵⁾(ζ₁)
* 12h 30
*
* where ζ₁ lies between x₀ - 2h and x₀ + 2h
Expand All @@ -43,7 +43,7 @@ class FivePointFormula extends NumericalDifferentiation
* - Note that when the 3rd point is our $target, we use a negative h.
*
* 1 h⁴
* f'(x₀) = - [-25f(x₀)+48f(x₀+h)-36f(x₀+2h)+16f(x₀+3h)-3f(x₀+4h)] + - f⁽⁵⁾(ζ₀)
* f(x₀) = - [-25f(x₀)+48f(x₀+h)-36f(x₀+2h)+16f(x₀+3h)-3f(x₀+4h)] + - f⁽⁵⁾(ζ₀)
* 12h 5
*
* where ζ₀ lies between x₀ and x₀ + 4h
Expand Down Expand Up @@ -88,7 +88,7 @@ public static function differentiate($target, $source, ... $args)
* - If the 3rd point is our $target, use the Midpoint Formula:
*
* 1 h⁴
* f'(x₀) = - [f(x₀-2h)-8f(x₀-h)+8f(x₀+h)-f(x₀+2h)] - - f⁽⁵⁾(ζ₁)
* f(x₀) = - [f(x₀-2h)-8f(x₀-h)+8f(x₀+h)-f(x₀+2h)] - - f⁽⁵⁾(ζ₁)
* 12h 30
*
* where ζ₁ lies between x₀ - 2h and x₀ + 2h
Expand All @@ -97,7 +97,7 @@ public static function differentiate($target, $source, ... $args)
* - Note that when the 3rd point is our $target, we use a negative h.
*
* 1 h⁴
* f'(x₀) = - [-25f(x₀)+48f(x₀+h)-36f(x₀+2h)+16f(x₀+3h)-3f(x₀+4h)] + - f⁽⁵⁾(ζ₀)
* f(x₀) = - [-25f(x₀)+48f(x₀+h)-36f(x₀+2h)+16f(x₀+3h)-3f(x₀+4h)] + - f⁽⁵⁾(ζ₀)
* 12h 5
*
* where ζ₀ lies between x₀ and x₀ + 4h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class SecondDerivativeMidpointFormula extends NumericalDifferentiation
*
* Second Derivative Midpoint Formula:
*
* 1 h²
* f''(x₀) = - [f(x₀-h) - 2f(x₀) + f(x₀+h)] - - f⁽⁴⁾(ζ)
* h² 12
* 1 h²
* f(x₀) = - [f(x₀-h) - 2f(x₀) + f(x₀+h)] - - f⁽⁴⁾(ζ)
* h² 12
*
* where ζ lies between x₀ - h and x₀ + h
*
Expand Down Expand Up @@ -71,9 +71,9 @@ public static function differentiate($target, $source, ... $args)
$h = ($sorted[2][$x] - $sorted[0][$x]) / 2;

/*
* 1 h²
* f''(x₀) = - [f(x₀-h) - 2f(x₀) + f(x₀+h)] - - f⁽⁴⁾(ζ)
* h² 12
* 1 h²
* f(x₀) = - [f(x₀-h) - 2f(x₀) + f(x₀+h)] - - f⁽⁴⁾(ζ)
* h² 12
*
* where ζ lies between x₀ - h and x₀ + h
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ThreePointFormula extends NumericalDifferentiation
* - If the 2nd point is our $target, use the Midpoint Formula:
*
* 1 h²
* f'(x₀) = - [f(x₀+h)-f(x₀-h)] - - f⁽³⁾(ζ₁)
* f(x₀) = - [f(x₀+h)-f(x₀-h)] - - f⁽³⁾(ζ₁)
* 2h 6
*
* where ζ₁ lies between x₀ - h and x₀ + h
Expand All @@ -43,7 +43,7 @@ class ThreePointFormula extends NumericalDifferentiation
* - Note that when the 3rd point is our $target, we use a negative h.
*
* 1 h²
* f'(x₀) = - [-3f(x₀)+4f(x₀+h)-f(x₀+2h)] + - f⁽³⁾(ζ₀)
* f(x₀) = - [-3f(x₀)+4f(x₀+h)-f(x₀+2h)] + - f⁽³⁾(ζ₀)
* 2h 3
*
* where ζ₀ lies between x₀ and x₀ + 2h
Expand Down Expand Up @@ -86,7 +86,7 @@ public static function differentiate($target, $source, ... $args)
* If the 2nd point is our $target, use the Midpoint Formula:
*
* 1 h²
* f'(x₀) = - [f(x₀+h)-f(x₀-h)] - - f⁽³⁾(ζ₁)
* f(x₀) = - [f(x₀+h)-f(x₀-h)] - - f⁽³⁾(ζ₁)
* 2h 6
*
* where ζ₁ lies between x₀ - h and x₀ + h
Expand All @@ -95,7 +95,7 @@ public static function differentiate($target, $source, ... $args)
* Note that when the 3rd point is our $target, we use a negative h.
*
* 1 h²
* f'(x₀) = - [-3f(x₀)+4f(x₀+h)-f(x₀+2h)] + - f⁽³⁾(ζ₀)
* f(x₀) = - [-3f(x₀)+4f(x₀+h)-f(x₀+2h)] + - f⁽³⁾(ζ₀)
* 2h 3
*
* where ζ₀ lies between x₀ and x₀ + 2h
Expand Down

0 comments on commit f94ecfe

Please sign in to comment.