# Introducing Sergey Gladkiy and TMS Analytics & Physics Pack

It's always a privilege and honour to be able to work with very smart people who are not only expert in Delphi but also expert in a specific domain. Earlier this year, Bernard Roussely and Marion Candau joined tmssoftware.com and focus so far on advanced cryptography algorithms with the highest security levels in TMS Cryptography Pack. More tools that will use this underlying strong technology are already in the pipeline. Around the same time, also Roman Yankovsky joined tmssoftware.com and the static code analysis tool TMS FixInsight is the result. With TMS FixInsight, you can bring your Delphi code to a higher quality & safer level with numerous code hints and suggestions it gives.
Today, I'm proud to announce Sergey Gladkiy joins the TMS team for working on products with a strong mathematical background. The first result is the TMS Analytics & Physics Pack. This pack offers a set of (non-visual) platform independent classes to work with mathematical expressions and units of measurements. In TMS Analytics & Physics Pack, you can do evaluation of complex multiparameter mathematical expressions, including expressions with complex numbers. You can do physical measurement conversions of all kinds. But perhaps the most amazing part is symbolic derivative calculations. In this respect, TMS Analytics & Physics Pack brings a math wizard in the form of classes that can be used in VCL and FMX apps. You can discover the power of this library via the included demo but I wanted to share some examples of symbolic derivative calculations that will boggle your mind:

Task: calculate the derivative function of:
1/(x-1)+(2*x-1)/(x+1)^2

Result:
(-(1)/(x-1)^2)+(2*(x+1)^2-(2*(x+1)^(2-1))*(2*x-1))/((x+1)^2)^2

The code to achieve this is as simple as:

var
f,df: string;

f := '1/(x-1)+(2*x-1)/(x+1)^2';

try
if Translator.CheckSyntax(f) then
begin
df:=Translator.Derivative(f,'x');
ShowMessage('Derivative function :' + df);
end;
except
ShowMessage('Error');
end;

Let's take another example with some trigonometric mathematical functions:

Task: calculate the derivative function of:
(sin(x)+cos(x))/x
Result:
((cos(x)+(-sin(x)))*x-(sin(x)+cos(x)))/x^2

The resulting derivative expression can then be evaluated, for example against x=2:

var
df: string;
v: TValue;

df := '((cos(x)+(-sin(x)))*x-(sin(x)+cos(x)))/x^2';

try
if Translator.CheckSyntax(df) then
begin
v :=Translator.Calculate(df);
ShowMessage('Result :' + s:=TUtilities.SafeToString(v));
end;
except
ShowMessage('Error');
end;

The result of this calculation is: -0,786009779256047.

I kindly invite you to explore our new TMS Analytics & Physics Pack. A fully functional trial version is available and the registered versions comes with full source code. We're eager to learn in what kind of exciting and cool applications these powerful classes will find a place!