Tuesday, 19 July 2016

Derivative of a Function.

Definition & Notation.

def. Derivative of a Function y = f(x) in point x is limit to which closes the ratio of increment of a function Δy to an increment of a variable Δx, when increment of a variable Δx closes to zero.



if such limit does not exist, then function has no derivative in this point.

derivative of a function y = f(x) we can note as:

, , , , .



Geometrical interpretation.

Geometrically, a derivative of a function is equal to a tanget of angle α, between the tangent line touching the graph of the function in a point x and positive direction of
the OX axis.




Additional notes.

Finding a derivative of a function we can call 'function differentiation'.

From definition we can see that derivative of a function is a quickness of the change of a function f(x), when x changes.


Calculations.

Let's calculate a few of function derivatives, using definiton.

1. y = sin(x).



We've used one of trigonometrical formulas (last one, for the sines difference):



... as well, as that is:



Similarly: (cos x)' = - sin x;

2. y = ax3, where a is any constant..



We've used Newton's Formula:



3. y = xn, n - natural number.



We've used Newton's Formula again.

The same formula for derivative (xk)' = kxk-1 we can use for any k.


(an unfinished article, to be continued).

Saturday, 27 February 2016

Java 8 Lambda Expressions.

Introduction.

Java version 8 adds a few of succint (terse, short, expressive) notations, compared to previous versions of that programming language.

There's more in Java 8 as well.


Lambda notation.



A comparison,
Java 8 lambda-notation vs. a pre-8 verbose notation.


... a source code file is available for download.


Method references.



A comparison,
Java 8 method-refence notation vs. a pre-8 verbose notation.


... a source code file is available for download.




Values can be applied to a static method references.


... a source code file is available for download.




Method references can be passed around & used in expressions,

Comparator class & BiFunction class are not in the same inheritance tree.


... a source code file is available for download.


Syntax conveniences.

... there are cases where we do not have to use complex instructions, delimited by brackets: { }.

... there are cases where we do not have to use a 'return' keyword, as last instruction's expression value is returned by default anyway.


Notes.

... it seems that most probably there's reflection involved with Java 8 Lambda Calculus.

Tuesday, 6 October 2015

Spiral Fractal.

(a placeholder for a tutorial post, to be filled with text & images when i have time).



Sierpiński's Triangle.

(a placeholder for a tutorial post, to be filled with text & images when i have time).