Professional Documents
Culture Documents
Experiment 1.3 Pde Lab
Experiment 1.3 Pde Lab
OF SCIENCES
Division: Mathematics
Experiment-1.3
Student Name: Kashish Malhotra UID: 21BMT1126
Branch: BSc. Math Hons Section/Group: BMA 2-A
Semester: 3rd Date of Performance: 05-10-2022
Subject Name: PDE and System of ODE Lab Subject Code: 21SMP 227
Objectives: Find the analytical solution of given first order PDE and plot the graph of integral
surface.
Input/Apparatus
used :
Hardware requirements : Computer system at least 1GB Ram and Disk
Space 10GB
Software requirements : Python IDLE
Discussion : Find the integral surface of first order quasi linear PDE which passage
through a given curve or cross section of two surfaces.
Code :
import numpy as np
from mpl_toolkits import mplot3d
import matplotlib.pyplot as plt
def f(x,y):
return (x*x+y*y+2)/(2*(1-x*y))
# x = np.arange(-3,3,.2)
# y = np.arange(-3,3,.2)
x = np.linspace(-3,3,50)
UNIVERSITY INSTITUTE
OF SCIENCES
Division: Mathematics
y = np.linspace(-3,3,50)
X, Y = np.meshgrid(x, y)
u = f(X,Y)
fig = plt.figure(figsize=(10,10))
ax = plt.axes(projection='3d')
ax.plot_surface(X, Y, u, rstride=1, cstride=1, cmap='jet', edgecolor='none')
ax.set_title('Integral Surface',fontsize=20)
plt.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=0, hspace=0)
ax.set_xlabel('x',fontsize=20)
ax.set_ylabel('y',fontsize=20)
ax.set_zlabel('z',fontsize=20)
plt.show()
Output :
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):