Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

📊 Calculus II: 3D Surfaces with MATLAB

Language Category Status Concept


🌟 Overview

This repository contains the construction and analysis of four 3D plots using MATLAB, developed as part of a Calculus II assignment.
Each plot represents a different multivariable function, exploring partial derivatives, continuity, and the geometric behavior of surfaces.


📈 Plot I – Wavy Surface

Explanation

This plot represents a trigonometric function combining sine and cosine. The result is a periodic surface with peaks and valleys, resembling waves. It is useful for visualizing oscillatory phenomena in two variables, such as vibrations or wave propagation.

Calculations

$$ z = \sin(x)\cos(y) $$

$$ \frac{\partial z}{\partial x} = \cos(x)\cos(y) $$

$$ \frac{\partial z}{\partial y} = -\sin(x)\sin(y) $$

$$ \frac{\partial^2 z}{\partial x^2} = -\sin(x)\cos(y) $$

$$ \frac{\partial^2 z}{\partial y^2} = -\sin(x)\cos(y) $$

Image

image

📈 Plot II – Intersecting Planes

Explanation

This plot shows two linear surfaces. Each is defined by an equation of the form (z = ax + by). Their intersection forms a line in three-dimensional space. Such plots are important for understanding linear systems and analytic geometry.

Calculations

$$ z = \sin(x)\cos(y) $$

$$ \frac{\partial z}{\partial x} = \cos(x)\cos(y) $$

$$ \frac{\partial z}{\partial y} = -\sin(x)\sin(y) $$

$$ \frac{\partial^2 z}{\partial x^2} = -\sin(x)\cos(y) $$

$$ \frac{\partial^2 z}{\partial y^2} = -\sin(x)\cos(y) $$

Image

image

📈 Plot III – Surface with Sharp Ridges

Explanation

The absolute value function generates discontinuities in the derivatives, creating sharp ridges and valleys. The surface is not smooth but composed of linear regions that change abruptly when crossing the axes. This type of function appears in optimization and analysis of non-differentiable functions.

Calculations

$$ z = |x| - |y| $$

$$ \text{If } x > 0, y > 0: \quad \frac{\partial z}{\partial x} = 1, \quad \frac{\partial z}{\partial y} = -1 $$

$$ \text{If } x < 0, y > 0: \quad \frac{\partial z}{\partial x} = -1, \quad \frac{\partial z}{\partial y} = -1 $$

$$ \text{If } x > 0, y < 0: \quad \frac{\partial z}{\partial x} = 1, \quad \frac{\partial z}{\partial y} = 1 $$

$$ \text{If } x < 0, y < 0: \quad \frac{\partial z}{\partial x} = -1, \quad \frac{\partial z}{\partial y} = 1 $$

Image

image

📈 Plot IV – Gaussian Surface

Explanation

The Gaussian function produces a bell-shaped surface, smooth and symmetric around the origin. It is widely used in statistics (normal distribution), image processing (Gaussian filters), and physics (modeling natural phenomena). The central peak represents the maximum of the function, which decays smoothly in all directions.

Calculations

$$ z = e^{-\frac{x^2 + y^2}{5}} $$

$$ \frac{\partial z}{\partial x} = -\frac{2x}{5} e^{-\frac{x^2+y^2}{5}} $$

$$ \frac{\partial z}{\partial y} = -\frac{2y}{5} e^{-\frac{x^2+y^2}{5}} $$

$$ \frac{\partial^2 z}{\partial x^2} = \left(\frac{4x^2}{25} - \frac{2}{5}\right) e^{-\frac{x^2+y^2}{5}} $$

$$ \frac{\partial^2 z}{\partial y^2} = \left(\frac{4y^2}{25} - \frac{2}{5}\right) e^{-\frac{x^2+y^2}{5}} $$

Image

image

🚀 How to Run

  1. Clone this repository.
  2. Open the file surfaces.m in MATLAB.
  3. Run each section (%%) to visualize the plots individually.

📬 Contact Me

About

This repository contains the construction and analysis of four 3D plots using MATLAB, developed as part of a Calculus II assignment.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages