Giter Club home page Giter Club logo

calculus-and-graphical-functions-visualization's Introduction

Calculus & Graphical Visualization of Functions

A project where we used Python and MySql to showcase a tiny yet significant part of the beautiful and interesting field of Mathematics - Calculus.

Important Notes

  • 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).

Repository Information

  • 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 Guide and Help

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.

Hardware Requirements

  • x86 64-bit CPU (Intel / AMD architecture).
  • A minimum of 2 GB RAM (4GB recommended).

Software Requirements

Support and Help

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).

Executing the Code

  • 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.

Limitations

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.

Output

The general first thing which you will notice after running the code is this :-

Screenshot 2023-11-21 233145

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).

  1. For example here is the Differentiation part:

Screenshot 2023-11-21 213003

  1. Now here is an Indefinite Integral part:

Screenshot 2023-11-21 213248

  1. Here is a Definit Integral part:

Screenshot 2023-11-21 213205

  1. And here is the Graphing part (both choices):

Screenshot 2023-11-21 232238

Screenshot 2023-11-21 213833

Exiting the code will simply display:

Screenshot 2023-11-21 232328

Now for viewing the User History you can simply go to MySQL Command Line Client or Workbench (Latest Version 8.0).

Screenshot 2023-11-23 201830

Output_X

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.)

Changelogs and Version History

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.

Version 3.7 (17th December 2023) [Latest Version]

  1. Added link to this Github Repository for reference.

Version 3.6 (24th November 2023)

  1. Removed unnecessary comment lines "#type:ignore" (used previously for ignoring warnings).
  2. Removed redundant guidelines and made it user - friendly.

Version 3.5 (21st November 2023)

  1. Fixed an issue in Matplotlib display of any function entered by the user.
  2. Fixed an error in displaying part of polynomial function as label and along y - axis in normal form in graphing part of the program.
  3. Added Name Error Handling.
  4. Added a Rule regarding entering of expressions in the Graphing part of program.
  5. 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.

Version 3.4 (18th November 2023)

  1. Improved Error Handling of mysql connection.
  2. Added better exit option.

Version 3.3 (13th November 2023)

  1. Added two messages displaying whether the result has been fetched from database or added to database.

Version 3.2 (4th November 2023)

  1. Documentation removed as we plan it to write it in a seperate code so as to make the code look clean.
  2. Reduced the number of lines by adding list comprehension.
  3. Removed Searching and Full viewing of user history function for MySql to make the code simple.

Version 3.1 (2nd November 2023)

  1. Connectivity Search is now integrated in main code.

Version 3.0 (2nd November 2023)

  1. Updated connectivity search for working.

Version 2.9 (28th October 2023)

  1. Fixed some indentation errors.
  2. Removed some unneccessary lines from rules.

Version 2.8 (24th October 2023)

  1. Added answer history storing system where is stores the type of functions being chosen and evaluated along with the answer.
  2. Fixed an issue in LaTeX display of differentiation.

Version 2.7 (20th October 2023)

  1. Fixed an issue in display of log(x) or ln(x) graph by adjusting its arange() and linespace().

Version 2.6 (18th October 2023)

  1. New graph function is now integrated in the code.
  2. Complex and Special functions like Alpha function, Lambert W , Riemann Zeta and Factorial Functions, etc. are not supported.
  3. Fixed an issue in the polynomial integration.

Version 2.5 (15th October 2023)

  1. Supports Modulus Function
  2. Better visualization of Polynomial functions (of n - degree where n can be input by the user) showing the roots.

Version 2.4 (12th October 2023)

  1. New graph function is added allowing more sophisticated and customizable functions to be displayed.
  2. It involves implicit functions over a wide range along a fixed domain.
  3. Modulus function is not yet supported.

Version 2.3 (8th October 2023)

  1. Code Documentation along with rules added.
  2. A welcome message is also added.

Version 2.2 (1st October 2023)

  1. LaTeX display is now supported for Differentiation part.
  2. Fixed a minor issue in LaTeX displaying of Inverse Trigonometric Function's parentheses and formulae.

Version 2.1 (29th September 2023)

  1. SQL connectivity's basic structure is implemented for storing the user's history in a database.

Version 2.0 (29th September 2023)

  1. Fixed a minor issue in exponential function display in LaTeX.

Version 1.9 (28th September 2023)

  1. LaTeX display is now supported for Definite Integrals' part.

Version 1.8 (21st September 2023)

  1. The evaluated expressions were difficult to understandable since its written in a machine linear form where one can have a difficulty in understanding.
  2. Hence we implemented LaTeX display using matplotlib especially for the functions in Indefinite Integral Calculus in the main code for better view.

Version 1.7 (21st September 2023)

  1. Definite Integration part is now supported.
  2. It is evaluated on the basis of fundamental theorem of Calculus.

Version 1.6 (17th September 2023)

  1. Graphical Function now supports Trigonometric Functions(alongwith Inverse functions also).
  2. Graphical Functions Visualization is now integrated in the main code.
  3. Random selection of similar results is removed to make the code less complicated.

Version 1.5 (16th September 2023)

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.

Version 1.4 (14th September 2023)

  1. Random selecting result is now supported for Differentiation.

Version 1.3 (14th September 2023)

  1. Indefinite Integration evaluation part was written.
  2. Indefinite Integration part is supported for all the 5 basic types of function (in linear form) as written for Differentiation earlier.
  3. Random choice is added to display random results from a set of results which are equivalent to one another (only for Indefinite Integration).

Version 1.2 (13th September 2023)

  1. Function to convert to superscript format (for powers and exponentials) was defined.
  2. Differentiation evaluating part was written.
  3. Differentiation is now supported for 5 basic types of functions - Inverse Trigonometric, Logarithmic, Basic Algebraic, Trigonometric and Exponentials.
  4. All the expressions are of linear form in order to keep the code structure simple.

Version 1.1 (13th September 2023)

  1. Menus and other conditional blocks were implemented.
  2. 3 Basic types of Operations are defined - Differentiation, Integration (Both Indefinite and Definite)

Version 1.0 (12th September 2023) [Oldest Version]

  1. A basic and rough structure of the code was defined.

calculus-and-graphical-functions-visualization's People

Contributors

rajveervora avatar vaibhav1506 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

rajveervora

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.