Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

UNIVERSITY INSTITUTE

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

Aim : Plot the integral surfaces of a given first order PDE.

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.

The given PDE is x ( y 2 + z ) p − y ( x 2 + z ) q=( x 2 − y 2 ) z , where z is the dependent variable and


x, y are the independent variables. Find that particular integral surface which passage
through the following curves x + y=0 and z =1.

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

Fig 1.1 (Python IDLE – CODE)


UNIVERSITY INSTITUTE
OF SCIENCES
Division: Mathematics

Output :

Fig 1.2 (Output of the code)


UNIVERSITY INSTITUTE
OF SCIENCES
Division: Mathematics

Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

S.N. Parameters Marks Obtained Maximum Marks


1. Conduct of Experiment 12
2. Viva-voce 10
3. Submission of Work Sheet 08

You might also like