Home Login  |   Contact  |   About Us       Thursday, November 28, 2024   

j0182018 - Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE  #1 ›   Complex Numbers ›  ~ Trigonometric



Skip Navigation Links.




TRIGONOMETRIC FUNCTIONS
Sine Function

We happen to know that a complex sine function can be calculated using complex exponential functions:

sin z = 1/2i (eiz - e-iz)
= 1/2i [ex(cos y + i sin y) - e-x(cos y - i sin y)]
= sin x cosh y + i cos x sinh y

This being the case, we can implement a Sine method and add to the KMP library as follows:

           public static Complex Sin(Complex c)
           {
           return new Complex(Math.Cosh(c.Imaginary) * Math.Sin(c.Real) +,
                                        (Math.Sinh(c.Imaginary) * Math.Cos(c.Real));
           }

Cosine Function

Similar to the case of the complex sine function, a complex cosine function can also be calculated using complex exponential functions:

cos z = 1/2i (eiz + e-iz)
= 1/2i [ex(cos y + i sin y) + e-x(cos y - i sin y)]
= cos x cosh y - i sin x sinh y

Using the above equation we can add a new method to the "Complex class". (Note - Complex class is an integral part of our software library and is not shown in these examples):

           public static Complex Cos(Complex c)
           {
           return new Complex(Math.Cosh(c.Imaginary) * Math.Cos(c.Real) -,
                                        (Math.Sinh(c.Imaginary) * Math.Sin(c.Real));
           }

Tangent Function

A complex tangent function is computed using complex sine and cosine functions:

tan z = sin z / cos z

The following complex Tangent method is added to the Complex class:

           public static Complex Tan(Complex c)
           {
             return Sin(c) / Cos(c);
           }









   Quotes

Consulting Services - Back to Home


Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

Integration
About Us


KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.

      (About Us) →
Areas of
Expertise


SpecialFunctions
VectorsMatrices
OptimizationMethods
ComplexNumbers
Interpolation
CurveFitting
NonLinearSystems
LinearEquations
DistributionFunctions
NumericalDifferentiation
NumericalIntegration
DifferentialEquations
Smalltalk
FiniteBoundary
Eigenvalue
Graphics
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
MINE REVIEW(by G.Pacheco)
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE