A project where we used Python and MySql to showcase a tiny yet significant part of the beautiful and interesting field of Mathematics - Calculus.
- Since this repository is completed it won't be receiving updates or any new additions. So issues and all aren't reviewed here.
- However, there is a new & complex version of this code coming to Github in the near future (Release Date is unknown).
- If you do have any doubts about any legal issues or others, feel free to contact me for the same (Email addresses given below for contact purposes).
- Line Count: 1181.
- Code Language : Python (Version 3.12) (100%).
- Created Using : Microsoft Visual Studio Code Editor.
- Date Created : 12th September 2023.
- Publish Date (on Github) : 14th November 2023.
- Last Updated : 3rd February 2024.
- Repository Status : Completed [Inactive].
- Authors : Rajveer Vora and Vaibhav Bakshi.
- Number of Contributor(s) : 2.
- License Used: GNU Public License (Open Source Project).
Code Documentation has now been added on 5th December 2023. It contains the description of all the algorithms and mechanism of the code written in a well explained manner. It was written using LaTeX typesetting language to generate a pdf. You can nagivate to the Synopsis and Documentation Folder and click on the Official Guide and Documentation.pdf. You can view it here.
You can also view the Flowchart which depicts the Flow of Control for our code thus making it easier to understand the execution process. You can view it here.
- Windows 7 or higher.
- Mac OS X 10.11 or higher, 64-bit.
- Linux: RHEL 6/7, 64-bit.
- Almost all python libraries also work in Ubuntu.
- Python or PyPy [Latest Version].
- MySql [Latest Version].
- Numpy Python Library.
- Matplotlib Python Library.
- Mysql-Connector Library.
If you find any discrepencies or want to suggest some improvements feel free to contact us at [email protected] (Rajveer Vora) and [email protected] (Vaibhav Bakshi).
- Make sure the above Software Requirements are satisfied including libraries.
- For installing libraries, first open Command Prompt(CMD) in Windows or Terminal in Mac OS or other operating systems.
- For installing numpy, run: pip3 install numpy
- For installing matplotlib, run: pip3 install matplotlib
- For installing mysql-connector-python, run: pip3 install mysql-connector-python
- Download the zip file and unzip it.
- Open the Folder in any code editor.
- Navigate to the file: Final_CS_Project_Code (Version 3.7).py
- Press F5 or run the code manually.
While our project successfully performs a variety of well-known tasks and adheres to standard practices, it is not without its share of issues and limitations. Some of these are even highlighted in the rules when the code is run while some are outlined below:-
- It only accepts linear specific functions of the form "f(ax + c)" (sometimes "b" for inverse trigonometric functions). Thus it does not support sophisticated or implicit or complex functions and is very limited.
- It cannot perform complex integrations like the Gaussian Integrals or the Bernoulli's Integrals or multivariable calculus either.
- For Definite Integration of Inverse Trigonometric Function sometimes the answer may not show up due to Function Domain Error issues.
- For Polynomial Graphs it cannot display the polynomials which have complex roots properly.
The general first thing which you will notice after running the code is this :-
Here you have to enter the given 3 parameters - hostname, username and password of your MySql database after accepting to run the code by entering "Y" or "y". Clearly there are 5 basic operations - Differentiation, Indefinite Integrals, Definite Integrals, Graphs and Exit. The user can enter the choice number and it further divides into operation type which consists of 5 basic mathematical expressions - Trigonometric, Inverse Trigonometric, Polynomial, Logarithmic and Exponential functions. This is only for the first 3 operations while for the 4th one there are 2 choices - One specifically for polynomials and other for universal (implicit / explicit functions).
- For example here is the Differentiation part:
- Now here is an Indefinite Integral part:
- Here is a Definit Integral part:
- And here is the Graphing part (both choices):
Exiting the code will simply display:
Now for viewing the User History you can simply go to MySQL Command Line Client or Workbench (Latest Version 8.0).
Therefore, you can see the results which the user has entered clearly in an organised and tabular format. (Note: The question marks are due to the fact that the Console / Client cannot display special characters like integrals & superscripts due to its encoding limitations.)
Contains various versions of the file from starting alongwith some details and descriptions about the code.The previous version files are availaible in the Previous Versions folder.
- Added link to this Github Repository for reference.
- Removed unnecessary comment lines "#type:ignore" (used previously for ignoring warnings).
- Removed redundant guidelines and made it user - friendly.
- Fixed an issue in Matplotlib display of any function entered by the user.
- Fixed an error in displaying part of polynomial function as label and along y - axis in normal form in graphing part of the program.
- Added Name Error Handling.
- Added a Rule regarding entering of expressions in the Graphing part of program.
- Added the expression entered in graphing part as answer to be inserted in database since using hyphens will result in duplication errors. This is due to the fact that the Answer column in the MySql database has UNIQUE constraint applied on it and since every graph will have hyphens as answer therefore we decided to change to the expresison entered by the user itself.
- Improved Error Handling of mysql connection.
- Added better exit option.
- Added two messages displaying whether the result has been fetched from database or added to database.
- Documentation removed as we plan it to write it in a seperate code so as to make the code look clean.
- Reduced the number of lines by adding list comprehension.
- Removed Searching and Full viewing of user history function for MySql to make the code simple.
- Connectivity Search is now integrated in main code.
- Updated connectivity search for working.
- Fixed some indentation errors.
- Removed some unneccessary lines from rules.
- Added answer history storing system where is stores the type of functions being chosen and evaluated along with the answer.
- Fixed an issue in LaTeX display of differentiation.
- Fixed an issue in display of log(x) or ln(x) graph by adjusting its arange() and linespace().
- New graph function is now integrated in the code.
- Complex and Special functions like Alpha function, Lambert W , Riemann Zeta and Factorial Functions, etc. are not supported.
- Fixed an issue in the polynomial integration.
- Supports Modulus Function
- Better visualization of Polynomial functions (of n - degree where n can be input by the user) showing the roots.
- New graph function is added allowing more sophisticated and customizable functions to be displayed.
- It involves implicit functions over a wide range along a fixed domain.
- Modulus function is not yet supported.
- Code Documentation along with rules added.
- A welcome message is also added.
- LaTeX display is now supported for Differentiation part.
- Fixed a minor issue in LaTeX displaying of Inverse Trigonometric Function's parentheses and formulae.
- SQL connectivity's basic structure is implemented for storing the user's history in a database.
- Fixed a minor issue in exponential function display in LaTeX.
- LaTeX display is now supported for Definite Integrals' part.
- The evaluated expressions were difficult to understandable since its written in a machine linear form where one can have a difficulty in understanding.
- Hence we implemented LaTeX display using matplotlib especially for the functions in Indefinite Integral Calculus in the main code for better view.
- Definite Integration part is now supported.
- It is evaluated on the basis of fundamental theorem of Calculus.
- Graphical Function now supports Trigonometric Functions(alongwith Inverse functions also).
- Graphical Functions Visualization is now integrated in the main code.
- Random selection of similar results is removed to make the code less complicated.
Initially we had no plans to add graphical visualization of functions. But we thought to implement it at a standard level. Hence the basic structure was created for Tangent Function.
- Random selecting result is now supported for Differentiation.
- Indefinite Integration evaluation part was written.
- Indefinite Integration part is supported for all the 5 basic types of function (in linear form) as written for Differentiation earlier.
- Random choice is added to display random results from a set of results which are equivalent to one another (only for Indefinite Integration).
- Function to convert to superscript format (for powers and exponentials) was defined.
- Differentiation evaluating part was written.
- Differentiation is now supported for 5 basic types of functions - Inverse Trigonometric, Logarithmic, Basic Algebraic, Trigonometric and Exponentials.
- All the expressions are of linear form in order to keep the code structure simple.
- Menus and other conditional blocks were implemented.
- 3 Basic types of Operations are defined - Differentiation, Integration (Both Indefinite and Definite)
- A basic and rough structure of the code was defined.