Skip to content

AllenJonathan/MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

CALCULUS USING MATLAB

A bunch of MATLAB code files used for solving common calculus problems.


Area under curve

Calculates the area between two curves and plots it in a graph.

Input

  • function of the upper curve in terms of x
  • function of the lower curve in terms of x

Output

  • Area between the curves
  • Graph representing the curves

Tangent of curve at origin.

Finds the equation of the tangent of a curve at the origin (0,0).

Input

  • function of the curve in terms of x
  • function of the curve in terms of x (extra input)

Output

  • Equation of the tangents in functions of x
  • Graph representing the curves and the tangents
Note: The code can be modified to get tangents at any point.

Local maxima/minima of one vvariable functions

Finds the points where the functions is minimum or maximum and and evaluates the function's value

Input

  • function of the curve in terms of x

Output

  • Displays if the critical points is a maxima or minima
  • Displays the value of the maxima or minima
  • Displays the point where maxima or minima occurs (value of x and y)
  • Graph of the curve and its extrema

Maxima/minima of two variable functions

Finds the maxima and minima of functions of two variables (surface)

Input

  • function of two variables (equation of surface) in terms of x and y

Output

  • Displays if the critical points where the function is a maxima or minima (x,y)
  • Displays the value of the maxima or minima
  • Graph of the surface and the extremas

Maxima/Minima using Langrange multiplier method

Finds the maximas and minimas of two variable functions (surfaces) using Langrange Multiplier method.

Input

  • function of two variables (equation of surface) in terms of x and y

Output

  • Displays if the critical points is a maxima or minima and point where it occurs (x,y)
  • Displays the value of the maxima or minima
  • Graph of the surface and the extremas
Note: Gives the same answer as previous code, just a different method

Volume of solid obtained by revolving a curve around an axis

Finds the volume of the solid obtained by revolving a curve (one variable function) around an axis

Input

  • function of two variables (equation of surface) in terms of x and y

Output

  • Displays the volume obtained by revolving the curve around y-axis
  • Graph of the solid whose volume was obtained

Gradient of a scalar-valued function

Finds the gradient of a scalar-valued function and represents it in a graph

Input

  • A scalar-valued function

Output

  • Displays the gradient of the scalar-valued function (vector field)
  • Graph of the resulting vector field

Curl of a vector field

Finds the curl of a vector field and represents it in a graph

Input

  • A vector field

Output

  • Displays the curl of the vector field (also a vector field)
  • Graph of the vector field

Divergence of a vector field

Finds the divergence of a vector field and represents it in a graph

Input

  • A vector field

Output

  • Displays the divergence of the vector field (a scalar quantity)
  • Graph of the vector field

About

Solving common calculus problems using MATLAB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages