Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Practical exam

Aim-solve the following differential equation


y"+6y'-20y=0 initial condition-y(0)=1 and y'(0)=3
Software use-Scilab
//
disp("Ayush chitra 3554")
disp("Aim-solve the following differential
equation--d^2*y/dx^2+6*dy/dx-20*y=0 initial condition- y(0)=1
and dy/dx(0)=3")
disp("software use=scilab")
function xp=f(t, x)
xp(1)=x(2);
xp(2)=-6*x(2)+20*x(1)
endfunction
t0=0;y0=1;yp0=3;
t=3:0.1:5;
y=ode([y0;yp0],t0,t,f);
disp(y)
plot(t,y)
clf
t=10:0.2:20;
y=ode([y0;yp0],t0,t,f);
disp(y)
plot(t,y)

Console, Graph and scinote pic

You might also like