chrislink.net


Apps for math problem solving in php


Give two natural numbers and click OK button to display their lcm and gcd












1) A PHP prime number program

2) A php project for solving a system of 3 equations with three unknowns

3) Find a list of prime numbers in php

4) Determine the irreducible value of a fraction with a php application

5) Find all the divisors of an integer in php

6) Display Fibonacci sequence

7) Find the greatest common divisor of two integers

8) Addition of two fractions

9) Display part of the list of multiples of an integer

10) php program to find the greatest common divisor(gcd) of two whole numbers

11) Find the least common multiple of two whole numbers with a php app

Introduction

Solving maths problems efficiently and quickly is not within everyone's reach. all the applications presented here are intended to help you for learning mathematics. You will easily find solutions to algebraic problems such as solving systems of equations, there is an equation solver which can solve equations for you(linears equations systems).
You can also learn math concepts like lcm, gcd, multiple, divisor step-by-step(addition, multiplication or division are for the apps). Another problem-solver you can find here is a math solving app that you can use to simplify a fraction and make it irreducible, there is also a math problem solver for the addition or subtraction of two fractions. A math solver app can find for you a list of prime numbers between two positive integers you give to it.
If you ask yourself how to solve this or that then don't worry those mathematical apps must find math answers to your math questions(or math problems). Those are free math apps that help you to practice math well and for doing well your homework.

Find a prime number in php

Here is a prime number program in php which will allow you to check if a given integer is a prime number or not. Download the application project, install it on your computer and start testing.
The image below is a test of the application, we enter the number 41 and when we click on the validate button, the program displays a message saying that 41 is a prime number. Then we try with 24, the program says that 24 is not a prime number and it frames 24 with 2 prime numbers closer to 24 wich are 23 and 29.

php prime number
prime number in php

Download source code

A php project for solving a system of 3 equations with three unknowns

The algorithm for solving this system of equations is based on the Gauss's pivot method.
The user of the application must enter the 12 coefficients of the system of equations for which he wants to find the solution in the 12 input fields of the application. Coefficients can be integer or decimal values, positive or negative values.
The system solution displays the values ​​of the unknowns x, y, and z when the system admits a solution. Otherwise the application returns a message to say the reason why the system is not resolvable.
The values ​​of x, y, and z that make up the solution to the system of equations can be integers, decimals, or fractions.
The example below in the image, displays the solution (x; y; z) of the system of equations, when entering the 12 coefficients of the system and clicking on the solve button.

System of 3 equations with 3 unknowns

Download source code

You can also download a php application to solve a system of two equations with two unknowns by clicking here.

A php program for displaying a list of prime numbers

We know that prime numbers are very useful for solving many math problems. By definition, a prime number is an positive integer which can only be divided by itself and 1.
Prime numbers allow for example to make a fraction irreducible by the decomposition of the numerator and the denominator into products of prime factors, they also make it possible to find the least common multiple(lowest common multiple) or the greatest common divisor of two integers, always by decomposition into products of prime factors.
It is difficult to confirm that an integer is a prime number just by seeing it. This is why this php application will allow you to find the list of prime numbers in any interval of whole numbers you want. All you have to do is enter the lower limit of the interval in the first input field of the form and its upper limit in the second input field and click on the validate button. For example if you enter 10 and 30 the application will display the following list: 11; 13; 17; 19; 23; 29.
The image below shows the result of a manipulation of the application. When you give the numbers 1 and 10 and click on the validate button, the application displays the list of prime numbers between 1 and 10 which are 2; 3; 5 and 7.
when a number is divisible by three or more numbers, we know directly that this number is not a prime number.


prime numbers

Download source code

Download also two java applications: one to check if a number is prime and the other to display a list of prime numbers click here

Find the irreducible value of a fraction with a php application

In arithmetic a fraction is the expression in the form of division of the value of a whole number or decimal. The value above the bar is called the numerator and the one below is called the denominator. A fraction can be simplifiable or is irreducible. To simplify a fraction we divide its numerator and denominator by one common-factor or several common-factors(of the numerator and the denominator). An irreducible fraction is a fraction whose greatest common factor of the numerator and the denominator is equal to 1, in other words it is a fraction that cannot be simplified. To make a fraction irreducible, we go through the successive simplification or we use the simplification by the greatest common divisor of the numerator and the denominator.
The algorithm of the php project presented here uses the simplification method by the greatest common divisor of the numerator and the denominator to make a given fraction irreducible. You can find the irreducible value of a fraction simply by giving its numerator in the first input field of the form and its denominator in the second input field and clicking on the simplify button. For example if you enter the numerator 4 and the denominator 6, the application will display: The irreducible form of the fraction 4/6 is 2/3.
Here is an example of using the application below: numerator = 344; denominator = 172. The application displays: the irreducible form of the fraction 344/172 is 2. Then the equivalent fraction is 2/1 but we write 2. Because when the denominator is 1 we don't write it.

irreducible fraction

Download source code

Find all the divisors of an integer with php

The divisor of an integer is an integer by which it is divided to find an integer quotient and a zero remainder. It is possible to find all the divisors of an integer. If it is a small natural number, it is easy to quickly find all its divisors but when the number is larger, it is more difficult to quote all its divisors. As an example we can give the set of divisors of 12 which is composed of: 1; 2; 3; 4; 6 and 12.
By dividing 12 by each of these numbers, we will find an integer quotient and a zero remainder.
This php application finds all the divisors of a natural integer even if the given natural number is large enough. To find all the divisors of an integer, give the value of the integer in the input field of the application form and click on the validate button. In the example below, when you enter 8 and click on the button, the application displays: here are the divisors of 8:1; 2; 4; 8.

the divisors of an integer

Download source code

Display Fibonacci sequence with a php app

The Fibonacci sequence is a sequence whose first two terms are 0 and 1. Each new element of the sequence is obtained by adding the last two elements of the sequence. Here is the set of elements of the Fibonacci sequence smaller than 10: 0; 1; 1; 2; 3; 5; 8.
This php project displays the desired number of elements of the Fibonacci sequence starting with the first two terms. Simply enter the number of terms to display in the input field of the application form and click on the validate button. In the example below, the application displays the first 20 terms of the Fibonacci sequence when the number 20 is entered:

Fibonacci sequence in php

Download source code

Find the greatest common divisor of two integers with a php app

The greatest common divisor of two integers is an integer that divides each of the two integers, giving an integer quotient and zero remainder and there is no other integer greater than it that can also divide the both numbers. For example the greatest common divisor of 4 and 6 is 2; that of 8 and 12 is 4.
This php application will show you the greatest common divisor of any couple of integers you give it. All you have to do is indicate the values ​​of the two integers in the two input fields of the form and click on the validate button. In the example below when the user enters 24 and 36 in the form; the app informs him that the greatest common divisor of 24 and 36 is 12.

the greatest common divisor

Download source code

Sum of two fractions in php

The calculus of the sum of two fractions is done in two ways depending on the case. Before to add or subtract 2 fractions, we check if the two fractions have common denominators or if they have different denominators. If the two fractions have a same denominator, to calculate their sum, we add their numerators and restore their common denominator. If the two fractions have different denominators, to make their sum, we have to find a common denominator before adding their numerators.
To make the subtraction of two fractions, we also use the same method. We can find the result of the subtraction by determining the common denominator and by subtracting the second numerator from the first numerator.
For finding a common denominator for the two fractions, you can either multiply the numerator and the denominator of one of the two fractions (or of the two fractions) by the same whole number or by simplifying the numerator and the denominator by a common factor.
Example: 1/4 + 3/2 = 1/4 + 6/4 = 7/4
10/3 + 8/6 = 10/3 + 4/3 = 14/3
1/2 + 3/5 = 5/10 + 6/10 = 11/10.
To multiply two fractions to find their product, their numerators will be multiplied together and their denominators too.
Example of two frations multiplication: 2/3 * 1/5 = 2/15
. This php application allows to add two fractions having a common denominator or not; and then makes it possible to make the sum found irreducible. The application form contains four input fields. The first input field is used to enter the numerator of the first fraction; the second lets you enter the denominator of the first fraction; the third lets you enter the numerator of the second fraction and the last lets you enter the denominator of the second fraction. When the 4 input fields are filled in, just click on the add button to see the result.
In the example below, when you enter the fractions 3/5 and 4/2 the application displays: 3/5 + 4/2 = 13/5.
13/5 is the irreducible value of the sum of the two fractions.

Sum of two fractions

Download source code

Display a list of multiples of a whole number

By multiplying two numbers, you find a third number. The third number found is a multiple of each of the first two numbers.
example: 5*4=20 then 20 is a multiple of 5 and a multiple of 4.
A given integer has an infinite number of multiples. This php application allows you to find all the multiples of an integer which are less than a given value. All you have to do is enter in the form of the web interface, the whole number whose multiples you are looking for in the first input field and the number to which the multiples must be less in the second input field and click on the validate button.
For example, if you enter 2 in the first input field and 10 in the second input field, the application must display: 0; 2; 4; 6; 8 which are multiples of 2 less than 10.
The link below will allow you to download the source code of this app.

multiples of an integer

Download source code

Find the greatest common divisor of two positive integers in php

The greatest common divisor (gcd) or the greatest common factor of two whole numbers in algebra, is the largest integer that is at the same time a divisor of the two integers. We cannot find another whole number greater than it that can divide both whole numbers at the same time.
The method of calculating the greatest common divisor of two whole numbers consists of decomposing the two numbers into products of prime factors and making the product of the factors common to the two numbers.
Example 1: The greatest common divisor of 12 and 8 is 4.
12 = 2 * 2 * 3
8 = 2 * 2 * 2
gcd(12;8) = 2 * 2 = 4
Example 2: The greatest common divisor of 60 and 42 is 6.
60 = 2 * 2 * 3 * 5
42 = 2 * 3 * 7
gcd(60;42) = 2 * 3 = 6
The php application allows you to quickly calculate the greatest common divisor. All you have to do is enter the two integers in the two input fields of the form and click on the submit button.
Click on the link below to download the project of the application.

Download

find greatest common divisor with php app

Calculate the least common multiple (lcm) of two whole numbers in php

The least common multiple or the lowest common multiple of two positive integers is the smallest number which can be divided at the same time by the two integers, there is not another positive integer smaller than it that can be divisible by the two numbers. The two integers are therefore called divisors or factors of their least common multiple.
To calculate the least common multiple of two whole numbers, we break down each of the two numbers into products of prime factors, we choose common factors to the two numbers which have highest exponents, we choose not common factors to the two numbers. The least common multiple is obtained by multiplying together the chosen factors.
Example 1:Let's caculate the least common multiple of 240 and 72
72 = 2^3 * 3^2
240 = 2^4 * 3 * 5
lcm(72;240) = 2^4 * 3^2 * 5
=> lcm(72;240) = 16 * 9 * 5 = 720
Example 1:Let's caculate the least common multiple of 20 and 15
20 = 2^2 * 5
15 = 3 * 5
lcm(20;15) = 2^2 * 3 * 5
=> lcm(20;15) = 4 * 3 * 5 = 60
The common factor 5 has the same exponent(1) for the two numbers so we choose 5 for the calculus.
Below there is a link that will allow you to download the project containing the source code of an application made in php. This application will automatically show you the least common multiple of two integers, enter the two integers in the two input fields of the form and click on the validate button.

Download

Calculate the least common multiple of two whole numbers



Java codes

Javascript codes