summaryrefslogtreecommitdiff
path: root/1670/CH9/EX9.17/9_17.sce
blob: 4eb5f2e39accb0b30876c2a4e3ad36d73061d46c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 9.17
//Particular Solution
//Page no. 298
clc;clear;close;

x=poly(0,'x')
n=2;
f=x^(n)-3*x^(n-1)+2*x^(n-2);
z=roots(f)
disp(z,f)
printf('\t\t    n\nC.F. = (c1+n*c2) (%g)',z(1))
A=[-4,0;2,-2];
B=[2;0];
C=inv(A)*B;
printf('\n\n\t     2\nP.I = (%g)n+(%g)n',C(1),C(2))