# File: example.php

 Recommend this page to a friend! Stumble It! Bookmark in del.icio.us
 Classes of Naveed ur Rehman > PHP Equations > example.php > Download
File: example.php Example script text/plain Example how to use PHP Equations Solve linear, polynomial, trigonometric equations By Naveed ur Rehman 1 year ago 1,866 bytes

## Contents

 ```

Examples for using phpEquations

Roots of a linear equation

5 - x + 2*4 = 88 solve("      5 - x + 2*4 = 88     ")); ?>

System of linear equations

a+b+2*c=5     a-b = u     u-2*a=4     2*b=a solve("     a+b+2*c=5     a-b = u     u-2*a=4     2*b=a     ")); ?>

Roots of a polynomial equation

3*pow(x,5) + 9*pow(x,3)+ x = 8 solve("     3*pow(x,5) + 9*pow(x,3)+ x = 8     ")); ?>

System of polynomial equations

pow(x,3)/7 +6*pow(y,2) + 5*pow(u,4) = 70     pow(x,4)/4 + 3*pow(y,3) + 2*pow(u,3) = 40     3*pow(x,3) +2*pow(y,2) = 0 solve("     pow(x,3)/7 +6*pow(y,2) + 5*pow(u,4) = 70     pow(x,4)/4 + 3*pow(y,3) + 2*pow(u,3) = 40     3*pow(x,3) +2*pow(y,2) = 0     ")); ?>

Roots of a trigonometric equation

sin(A) + cos(A) = 0.5 solve("     sin(A) + cos(A) = 0.5     ")); ?>

System of trigonometric equations

sin(A) + cos(B) = 0.5     pow(sin(A),2) - pow(cos(B),2) = 0.1 solve("     sin(A) + cos(B) = 0.5     pow(sin(A),2) - pow(cos(B),2) = 0.1     ")); ?>

Volume of sphere

What will be the radius of sphere having volume of 10 m^3?     V = (4/3)*PI#*(pow(R,3))     V = 10 solve("     V = (4/3)*PI#*(pow(R,3))     V = 10     ")); ?>

Height of building

One can see the top of a building at 35 deg from horizontal. Building is 20 m away. What is the height of building?     ANGLE_DEG = 35     DISTANCE = 20     tan(ANGLE_DEG*PI#/180)=HEIGHT/DISTANCE solve("     ANGLE_DEG = 35     DISTANCE = 20     tan(ANGLE_DEG*PI#/180)=HEIGHT/DISTANCE     ")); ?> ```
 Advertise on this site Site map Newsletter Statistics Site tips Privacy policy Contact