0% found this document useful (0 votes)
9 views

P-6

The document presents solutions to various Cauchy problems for first-order partial differential equations (PDEs) using symbolic computation. It includes multiple equations, their corresponding solutions, and 3D plots to visualize the results. Each question outlines a different PDE scenario with initial conditions and provides the derived solutions step-by-step.

Uploaded by

Rohit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

P-6

The document presents solutions to various Cauchy problems for first-order partial differential equations (PDEs) using symbolic computation. It includes multiple equations, their corresponding solutions, and 3D plots to visualize the results. Each question outlines a different PDE scenario with initial conditions and provides the derived solutions step-by-step.

Uploaded by

Rohit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical-6

Solution of Cauchy problem for first order PDE


Question-1
In[1]:= eqn1 = D[u[x, y], x] + x * D[u[x, y], y] ⩵ 0
Out[1]= x u0,1  [x, y] + u1,0  [x, y] ⩵ 0

In[2]:= sol1 = u[x, y] / . DSolve [{eqn1, u[0, y] ⩵ Sin [y]}, u[x, y], {x, y}]
x2
Out[2]= - Sin  - y
2

In[3]:= Plot3D [sol1, {x, - 5, 5}, {y, - 5, 5}]

Out[3]=

Question-2
In[4]:= eqn2 = 3 * D[u[x, y], x] + 2 * D[u[x, y], y] ⩵ 0
Out[4]= 2 u0,1  [x, y] + 3 u1,0  [x, y] ⩵ 0

In[5]:= sol2 = u[x, y] / . DSolve [{eqn2, u[x, 0] ⩵ Sin [x]}, u[x, y], {x, y}]
3 2x
Out[5]= - Sin  - + y 
2 3
2

In[6]:= Plot3D [sol2, {x, - 5, 5}, {y, - 5, 5}]

Out[6]=

Question-3
In[7]:= eqn3 = y * D[u[x, y], x] + x * D[u[x, y], y] ⩵ 0
Out[7]= x u0,1  [x, y] + y u1,0  [x, y] ⩵ 0

In[11]:= sol3 = u[x, y] / . DSolve [{eqn3 , u[0, y] ⩵ Exp [- y ^ 2]}, u[x, y], {x, y}]

ⅇ 
x2 - y2
Out[11]=

In[9]:= Plot3D [sol3, {x, - 5, 5}, {y, - 5, 5}]

Out[9]=

Question 4 : ∂x u[x,y] + 2* ∂y u[x,y] = 1 + u[x, y]


u[x, y] = Sin[x] on y = 3*x + 1;
3

In[12]:= A = D[u[x, y], x] + 2 * D[u[x, y], y] ⩵ 1 + u[x, y]


Out[12]= 2 u0,1  [x, y] + u1,0  [x, y] ⩵ 1 + u[x, y]

In[13]:= sol = DSolve [{A, u[x, 3 * x + 1] ⩵ Sin [x]}, u[x, y], {x, y}]
u[x, y] → - ⅇ - ⅇ +ⅇ +ⅇ
-y 1+ 3 x y 1+ 3 x
Out[13]= Sin [1 + 2 x - y]

In[17]:= Plot3D [u[x, y] / . sol, {x, - 2, 2}, {y, - 7, 8}, AxesLabel → {Automatic }]

Out[17]=

Question 5. Solve the PDE Subscript[uu, x]+ Subscript[u, y]=1/2. With the initial
condition u(s,s)=s/4,
0<=s<=1.
Solution: x=s+st/4=t^2/4, y=s+t, u=s/4+t/2.
In[18]:= sol = DSolve [{x '[t] ⩵ u[t], y '[t] ⩵ 1, u '[t] ⩵ 1 / 2, x[0] ⩵ s,

y[0] ⩵ s, u[0] ⩵ s / 4}, {x[t], y[t], u[t]}, t]


1 1
 u[t] → (s + 2 t), x[t] → × 4 s + s t + t , y[t] → s + t
2
Out[18]=
4 4

In[19]:= Print ["u[t]= ", sol 〚 1, 1, 2〛]


1
u [ t ]= (s + 2 t)
4

In[20]:= Print ["y[t]= ", sol 〚 1, 2, 2〛]


1
× 4 s + s t + t 
2
y [ t ]=
4

In[21]:= Print ["x[t]= ", sol 〚 1, 3, 2〛]


x [ t ]= s + t
4

In[22]:= map = ParametricPlot3D [{sol 〚 1, 1, 2〛 , sol 〚 1, 2, 2〛 ,

sol 〚 1, 3, 2〛}, {t, - 1, 1}, {s, 0, 1}, PlotPoints → 10 ]

Out[22]=

You might also like