You are on page 1of 8

Date-28/09/2020

Question 1

In[3]:= eqn1 = D[u[x, y], x] + x * D[u[x, y], y] == 0


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

In[4]:= sol1 = u[x, y] / . DSolve [{eqn1 , u[0, y] == Sin [y]}, u[x, y], {x, y}]
1
 Sin  - x + 2 y
2
Out[4]=
2

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

Out[6]=

Question 2

In[1]:= eqn2 = D[u[x, y], x] - D[u[x, y], y] == 1


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

In[2]:= sol2 = u[x, y] / . DSolve [{eqn2 , u[x, 0] == x ^ 2}, u[x, y], {x, y}]
x - y + 2 x y + y 
2 2
Out[2]=
2

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

Out[4]=

Question 3

In[5]:= eqn3 = x * D[u[x, y], x] + y * D[u[x, y], y] == x * Exp [- u[x, y]]


Out[5]= y u0,1 [x, y] + x u1,0 [x, y] ⩵ ⅇ - u[ x,y] x

In[6]:= sol3 = u[x, y] / . DSolve [{eqn3 , u[x, x ^ 2] == 0}, u[x, y], {x, y}]
Solve : Inverse functions are being used by Solve , so some solutions may not be found ; use Reduce for complete
solution information .

Solve : Inverse functions are being used by Solve , so some solutions may not be found ; use Reduce for complete
solution information .
y
Out[6]=  Log  1 + x - 
x
3

In[7]:= Plot3D [sol3 , {x, 1, 5}, {y, 1, 5}]

Out[7]=

Question 4

In[1]:= eqn4 = 3 D[u[x, y], x] + 2 D[u[x, y], y] == 0


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

In[2]:= sol4 = u[x, y] / . DSolve [{eqn4 , u[x, 0] == Sin [x]}, u[x, y], {x, y}]
1
Out[2]=  Sin  (2 x - 3 y)
2

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

Out[3]=

Question 5
4

In[10]:= eqn5 = D[u[x, y], x] + x * D[u[x, y], y] == (y - 1 / 2 x ^ 2) ^ 2


2
x2
Out[10]= x u0,1 [x, y] + u1,0 [x, y] ⩵ - +y
2

In[15]:= sol5 = u[x, y] / . DSolve [{eqn5 , u[0, y] == Exp [y]}, u[x, y], {x, y}]
1 x2 x2 x2 x2

 ⅇ 4 ⅇy + ⅇ x5 - 4 ⅇ x3 y + 4 ⅇ x y2 
-
Out[15]= 2 2 2 2

In[17]:= Plot3D [sol5 , {x, - 5, 5}, {y, - 5, 5}]

Out[17]=

Question 6

In[20]:= eqn6 = D[u[x, y], x] + 2 x * D[u[x, y], y] == 2 x u[x, y]


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

In[21]:= sol6 = u[x, y] / . DSolve [{eqn6 , u[x, 0] == x ^ 2}, u[x, y], {x, y}]
- ⅇ - x + y
y 2
Out[21]=
5

In[22]:= Plot3D [sol6 , {x, - 5, 5}, {y, - 5, 5}]

Out[22]=

Question 7

In[1]:= eqn7 = D[u[x, y], x] + x * D[u[x, y], y] == y


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

In[2]:= sol7 = u[x, y] / . DSolve [{eqn7 , u[0, y] == y ^ 2}, u[x, y], {x, y}]
1
 - 4 x + 3 x + 12 x y - 12 x y + 12 y 
3 4 2 2
Out[2]=
12

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

Out[3]=

Question 8
6

In[6]:= eqn8 = D[u[x, y], x] + x * D[u[x, y], y] == y


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

In[7]:= sol8 = u[x, y] / . DSolve [{eqn8 , u[1, y] == 2 y}, u[x, y], {x, y}]
1
 5 - 3 x - 2 x + 6 y + 6 x y
2 3
Out[7]=
6

In[8]:= Plot3D [sol8 , {x, - 5, 5}, {y, - 5, 5}]

Out[8]=

Question 9

In[9]:= eqn9 = x * D[u[x, y], x] + y * D[u[x, y], y] == 2 x y


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

In[10]:= sol9 = u[x, y] / . DSolve [{eqn9 , u[x, x ^ 2] == 2}, u[x, y], {x, y}]
2 x3 + x4 y - y3
Out[10]=  
x3
7

In[11]:= Plot3D [sol9 , {x, - 5, 5}, {y, - 5, 5}]

Out[11]=

Question 10

In[12]:= eqn10 = D[u[x, y], x] + 3 D[u[x, y], y] == u[x, y]


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

In[13]:= sol10 = u[x, y] / . DSolve [{eqn10 , u[x, x] == Cos [x]}, u[x, y], {x, y}]
x y 1
ⅇ Cos 
- +
Out[13]= 2 2 (3 x - y)
2

In[14]:= Plot3D [sol10 , {x, - 5, 5}, {y, - 5, 5}]

Out[14]=

Question 11
8

In[15]:= eqn11 = D[u[x, y], x] + 2 x * D[u[x, y], y] == 2 x u[x, y]


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

In[16]:= sol11 = u[x, y] / . DSolve [{eqn11 , u[x, 0] == x ^ 2}, u[x, y], {x, y}]
- ⅇ - x + y
y 2
Out[16]=

In[17]:= Plot3D [sol11 , {x, - 5, 5}, {y, - 5, 5}]

Out[17]=

You might also like