summaryrefslogtreecommitdiff
path: root/260/CH15/EX15.1/15_1.sce
blob: fae9efee4f39a377e6fb469e1179ef2cc914e4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//Eg-15.1
//pg-605

clear
clc

//using d/dx to denote the partial derivatve w.r.t x

//Consider the general equation defined by the equation [2] on pg-605

// A * d^2(F)/dx^2 + B * d^2(F)/dxdy + C * d^2(F)/dy^2 + D = 0;
//for part (i) 

A(1) = 1;
B(1) = 0;
C(1) = 1;
D(1) = 0;

//for part (ii)

A(2) = 1;
B(2) = 0;
C(2) = -1;
D(2) = 0;

//for part(iii)

A(3) = 1;
B(3) = 0;
C(3) = 0;
D(3) = 0;

for(i = 1:3)
    dt(i) = B(i)^2 - 4*A(i)*C(i);
    
    if(dt(i) > 0)
        printf('The discriminant of the PDE in part %d is  %f ,so it is Hyperbolic\n',i,dt(i))
    
    elseif(dt(i) < 0)
        printf('The discriminant of the PDE in part %d is  %f ,so it is Elliptic\n',i,dt(i)')
    
    else(dt(i) == 0)
        printf('The discriminant of the PDE in part %d is  %f ,so it is parabolic\n',i,dt(i)')
    end
    
end