Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - msu_math

Pages: 1 [2] 3 4 ... 6
16
Programming Competition / Re: Calculating Square Root of Integer, PHP Code
« on: November 22, 2012, 12:08:30 PM »
Sample Return value of SquareRoot():

Call: SquareRoot( 562 );     Return value:  23.7065

Steps in Division Method:
---------------------------------------------------------------------------------------
1. Dividant = 5,               Divisor = 2,              Square Root = 2
---------------------------------------------------------------------------------------
2. Dividant = 162,           Divisor = 43,            Square Root = 23
---------------------------------------------------------------------------------------
3. Dividant = 3300,         Divisor = 467,          Square Root = 23.7
---------------------------------------------------------------------------------------
4. Dividant = 3100,         Divisor = 4740,        Square Root = 23.70
---------------------------------------------------------------------------------------
5. Dividant = 310000,     Divisor = 47406,      Square Root = 23.706
---------------------------------------------------------------------------------------
6. Dividant = 2556400,   Divisor = 474125,    Square Root = 23.7065
---------------------------------------------------------------------------------------

17
Programming Competition / Calculating Square Root of Integer, PHP Code
« on: November 21, 2012, 06:37:27 PM »
The function SquareRoot( $number ) returns square root of integer up to 4 decimal places.

function SquareRoot( $number )
{
$number = $number."00000000";
$number_length = strlen($number);
if($number_length % 2 == 0)
    {
       $dividant = $number[0].$number[1];
       for($i=2;$i<$number_length;$i++) 
           {
                $number[$i-2] = $number[$i];
           }
       $number[$number_length-1] = NULL;
       $number[$number_length-2] = NULL;
       $number_length = $number_length-2;   
    }
else
    {
       $dividant = $number[0]; 
       for($i=1;$i<$number_length;$i++) 
         {         
              $number[$i-1] = $number[$i];
         }
       $number[$number_length-1] = NULL;
       $number_length = $number_length-1;   
    }
$root = 0;
while($dividant != 0)
   {
        $multiplier = 0;
        $product = 0;
        while($product <= $dividant)
              {
                   $divisor = $root*2;       
                   $multiplier = $multiplier+1;   
                   $divisor = $divisor*10+$multiplier;
                   $product = $divisor*$multiplier; 
              }
        $multiplier = $multiplier-1;
        $divisor = $root*20+$multiplier;
        $root = $root*10+$multiplier;
        $square_root = $square_root.$multiplier;
        if($number_length==8)
              {
                   $square_root = $square_root.".";
              }
        $product = $divisor*$multiplier;
        $dividant = $dividant-$product;
        if($number_length <= 0)
            {
                 break;
            }
        $dividant = $dividant.$number[0].$number[1];
        for($i=2;$i<$number_length;$i++) 
             {         
                   $number[$i-2] = $number[$i];
             }
        $number[$number_length-1] = NULL;
        $number[$number_length-2] = NULL;
        $number_length = $number_length-2;
   }
return $square_root;
}

18
Departments / Re: Published paper in USA
« on: November 21, 2012, 06:21:05 PM »
Congratulations !

19
Basic Maths / Re: Shortcut Methods for Partial Fractions
« on: November 21, 2012, 10:58:14 AM »
Useful Example:

      4               1        4        1         1               4        1             1                 4          4      1          1             
------------  =  ---- . ------- ( ----  -  ------ )   =   ---- ( ------  -  ----------- )  =  ------  -  ---- ( ----  -  ------- )
 x2(x+3)          x      3-0       x       x+3             3       x2         x(x+3)           3x2        3       x        x+3

                        4          4              4     
                 =  ------  -  -----  +  ----------
                      3x2        3x        3(x+3)

20
Basic Maths / Shortcut Methods for Partial Fractions
« on: November 21, 2012, 10:55:57 AM »
In algebra, the partial fraction decomposition or partial fraction expansion is a procedure used to reduce the degree of either the numerator or the denominator of a rational function. The main motivation to decompose a rational function into a sum of simpler fractions is that it makes it simpler to perform linear operations on it.

The problem of computing derivatives, anti-derivatives, integrals, inverse Laplace transforms, power series expansions, Fourier series, residues, and linear functional transformations of rational functions can be reduced, via partial fraction decomposition, to making the computation on each single element used in the decomposition.


Standard Form 1:

         p                   p           1            1
----------------  =  ------- ( --------  -  ------- )
 (x+a)(x+b)          b-a       x+a         x+b   
 

Example:

         5                   5             1             1               5       1             1
----------------  =  ---------  ( --------  -  ------ )   =   ---- ( -------  -  -------- )
 (x-1)(x+3)          3-(-1)        x-1         x+3             4      x-1         x+3


Standard Form 2:

           p                      p           1               1
--------------------  =  ------- ( ---------  -  --------- )
  (xn+a)(xn+b)          b-a       xn+a         xn+b   
 

Example:

         3                       3             1              1                 3        1              1
------------------  =  ---------  ( ---------  -  --------- )   =   ---- ( --------  -  --------- )
 (x2-2)(x2+3)         3-(-2)        x2-2         x2+3              5      x2-2         x2+3


Standard Form 3:

         p                     p            1             x-a
----------------  =  ---------- ( --------  -  ---------- )
 (x+a)(x2+b)         b+a2       x+a          x2+b   
 

Example:

        7                        7              1            x+2               1           x+2
-----------------  =  ------------  ( -------  -  --------- )   =  -------  -  ---------
 (x-2)(x2+3)          3+(-2)2        x-2         x2+3             x-2         x2+3

21
Math Helps / Completing Perfect Squares
« on: November 21, 2012, 10:52:19 AM »
Problem: For what integer value n is n2 + 6x + 10 also a perfect square?

Solution: Let us first express the given polynomial n2 + 6x + 10 in the form "a perfect square + constant". We have, n2 + 6x + 10 = (n+3)2 +1. If n2 + 6x + 10 = m2 for some integer m, then 1 = m2 - (n+3)2. The left hand side gives the difference of two perfect squares which is 1 as in the right side. The only perfect squares that differ by 1 are 0 and 1. Hence, (n+3)2 = 0 , having the solution n = -3 which gives the required value of n.

22
Math Helps / Finding Maximum Value of Quadratic Polynomials
« on: November 21, 2012, 10:48:45 AM »
Problem: What is the maximum value of -x2 + 4x + 10?

Solution: At first we rewrite the given polynomial in the form "a perfect square + constant". Here, -x2 + 4x + 10 = - (x-2)2 + 14 . Since squares are non-negative, - (x-2)2 + 14 <= 14. Thus, the maximum value of the quadratic is 14, which is achieved for the minimum value of (x-2)2 i.e. for (x-2)2=0 or at x=2.

23
Web based Developer Forum / Re: PHP codes to simplify fractions
« on: November 19, 2012, 11:34:23 AM »
Sample return values of FracSymp() function:

FracSymp("24/32");       Return value:  "3/4"

FracSymp("-21/7");        Return value:  "-3"

FracSymp("1/8");           Return value:  "1/8"

FracSymp("22/1");         Return value:  "22"

24
As a food Black cumin seed is one that can stake a claim as a super food.  In Arabic  it is known as ‘Habbat ul Sawda’. According to hadith, the Prophet Muhammed (pbuh) is believed to have said: “In the black seed is healing for every disease except death.” (Sahih Bukhari)

Indigenous to the Mediterranean region, the black cumin plant (Nigella Sativa) has been used medicinally by Muslims and non-Muslims alike for hundreds of years. In fact the earliest written reference to the black cumin is in the book of Isaiah in the Old Testament where Isaiah talks of the harvesting of the black seed. It was also mentioned in the Bible as the curative ‘black seed’ and has been used by Asian herbalists and the Romans for culinary purposes.

25
Faculty Forum / Re: How math will help us in our daily life
« on: November 18, 2012, 07:18:26 PM »
In case of rooms/corridors which are not exact rectangular or circular shaped, the following geometry can help in calculating areas:

Parallelogram shape:   Area = Base Length x Height   

Triangular shape:         Area = Half of ( Base Length x Height )

Trapezoidal shape:      Area = Half of { (Length 1 + Length 2) x Height }

26
Problems and Solutions / Re: Problem with restricted distribution
« on: November 18, 2012, 07:00:00 PM »
There are exactly 2 ways:  {3, 3, 3, 2, 2, 2}  and  {3, 3, 3, 3, 2, 1}    8)

27
Web based Developer Forum / Re: Processing Rational input-output in PHP
« on: November 18, 2012, 11:54:41 AM »
Sample return values:

FracCheck("-5/7");    Return value:  1

FracCheck("-3/5/7");    Return value:  0   
         
      *Because "-3/5/7" is not a valid fraction. ("-3/5/7" contains more than one "/")

FracCheck("51/7p");    Return value:  0   

      *Because "51/7p" is not a valid fraction. ("51/7p" contains non-digit character "p")

28
Sample Return Values:

FracNumer("-11/7");    Return value:  "-11"

FracNumer("28");    Return value:  "28"

FracDenom("28");    Return value:  "1"

FracDenom("5/7");    Return value:  "7"

FracNumer("-3/5/7");    Return value:  NULL   
         
      *Because "-3/5/7" is not a valid fraction. ("-3/5/7" contains more than one "/")

FracDenom("51/7k");    Return value:  NULL   

      *Because "51/7k" is not a valid fraction. ("51/7k" contains non-digit character "k")


29
Web based Developer Forum / Re: Basic Operatins with Fractions (PHP code)
« on: November 16, 2012, 06:01:54 PM »
The FracOper() function can be subdivided into four distinct functions:

  function FracSum($A, $B)

    {
         return FracSymp(($C/FracDenom($A))*FracNumer($A)+($C/FracDenom($B))*FracNumer($B)."/".$C);
    }


   function FracDifference($A, $B)

    {
         return FracSymp(($C/FracDenom($A))*FracNumer($A)-($C/FracDenom($B))*FracNumer($B)."/".$C);
    }


   function FracProduct($A, $B)

    {
         return FracSymp(FracNumer($A)*FracNumer($B)."/".FracDenom($A)*FracDenom($B));
    }


   function FracQuotient($A, $B)

    {
         return FracSymp(FracNumer($A)*FracDenom($B)."/".FracDenom($A)*FracNumer($B));
    }


30
Applied Maths / Re: Fluid dynamics
« on: November 16, 2012, 02:48:23 PM »
Navier–Stokes Equations

The Navier–Stokes equations (named after Claude-Louis Navier and George Gabriel Stokes) are the set of equations that describe the motion of fluid substances such as liquids and gases. These equations state that changes in momentum (force) of fluid particles depend only on the external pressure and internal viscous forces (similar to friction) acting on the fluid. Thus, the Navier–Stokes equations describe the balance of forces acting at any given region of the fluid.

The Navier–Stokes equations are differential equations which describe the motion of a fluid. Such equations establish relations among the rates of change of the variables of interest. For example, the Navier–Stokes equations for an ideal fluid with zero viscosity states that acceleration (the rate of change of velocity) is proportional to the derivative of internal pressure.

This means that solutions of the Navier–Stokes equations for a given physical problem must be sought with the help of calculus. In practical terms only the simplest cases can be solved exactly in this way. These cases generally involve non-turbulent, steady flow (flow does not change with time) in which the Reynolds number is small.

Pages: 1 [2] 3 4 ... 6