Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% 1a
- clear all
- clc
- syms t p
- f = (cos(t))^3;
- L = laplace(f, t, p)
- pretty(L)
- %% 1b
- clear all
- clc
- syms t p
- f = (sin(t))^2;
- L = laplace(f, t, p)
- %% 1c
- clear all
- clc
- syms t p
- f = (1/3)*sin(3*t)-5;
- L = laplace(f, t, p)
- %% 1d
- clear all
- clc
- syms t p
- f = 4*t^2 - 2*t +3;
- L = laplace(f, t, p)
- %% 1e
- clear all
- clc
- syms t p
- f = 4 - 5*exp(2*t);
- L = laplace(f, t, p)
- %% 1f
- clear all
- clc
- syms t p
- f = (1/3)*t^3 + 4*cos(2*t);
- L = laplace(f, t, p)
- %% 1g
- clear all
- clc
- syms t p
- f = exp(t)*(cos(t))^2;
- L = laplace(f, t, p)
- %% 2h
- clear all
- clc
- syms t p
- F = p/(p^2 - 2*p + 5);
- L = ilaplace(F, p, t)
- pretty(L)
- %% 2i
- clear all
- clc
- syms t p
- F = 1/(p^3-8)
- L = ilaplace(F, p, t)
- %% 2j
- clear all
- clc
- syms t p
- F = 1/((p-1)*(p^2-4));
- L = ilaplace(F, p, t)
- %% 2k
- clear all
- clc
- syms t p
- F = (p+3)/(p*(p^2-4*p+3));
- L = ilaplace(F, p, t)
- %% 2_1
- clear all
- clc
- syms t p
- F = 1/(p^3+2*p^2+p);
- L = ilaplace(F, p, t)
- %% 3a
- clear all
- clc
- syms x y(x)
- lygtis = x*diff(y,x) == 2*x^2;
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- fplot(x^2 + C1, [-3 3]);
- hold on
- drawnow
- end
- %% 3b
- clear all
- clc
- syms x y(x)
- lygtis = (x-2)*sqrt(y) == x*diff(y,x);
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- fplot((C1 + x/2 - log(x))^2, [-3 3]);
- hold on
- drawnow
- end
- %% 3c
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x)*sin(x)*cos(x) + y*(cos(x))^2 == (sin(x))^2;
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- fplot((log(tan(x/2 + pi/4)) - sin(x))/sin(x) + C1/sin(x), [-3 3]);
- hold on
- drawnow
- end
- %% 3d
- clear all
- clc
- syms x y(x)
- lygtis = x*diff(y,x)-y == 3*x;
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- fplot(C1*x + 3*x*log(x), [-3 3]);
- hold on
- drawnow
- end
- %% 3e
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,3) == x*exp(x);
- y_spr(x) = dsolve(lygtis)
- for C1 = -2:2
- for C2 = -2:2
- for C3 = -2:2
- fplot(C3 - 3*exp(x) + C2*x + (C1*x^2)/2 + x*exp(x), [-2 2]);
- hold on
- drawnow
- end
- end
- end
- %% 3f
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,2)-diff(y,x)-12*y == 0;
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- for C2 = -3:3
- fplot(C1*exp(-3*x) + C2*exp(4*x), [-3 3]);
- hold on
- drawnow
- end
- end
- %% 3g
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,3) - diff(y,x,2) + diff(y,x) - y == x^2 + x;
- y_spr(x) = dsolve(lygtis)
- for C1 = -2:2
- for C2 = -2:2
- for C3 = -2:2
- fplot(C2*cos(x) - 3*x + C1*exp(x) - C3*sin(x) - x^2 - 1, [-2 2]);
- hold on
- drawnow
- end
- end
- end
- %% 3h
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,2) + 4*diff(y,x) + 4*y == 8*exp(-2*x);
- y_spr(x) = dsolve(lygtis)
- for C1 = -3:3
- for C2 = -3:3
- fplot(4*x^2*exp(-2*x) + C1*exp(-2*x) + C2*x*exp(-2*x), [-3 3]);
- hold on
- drawnow
- end
- end
- %% 3i
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,2) + 4*diff(y,x) - 12*y == 8*sin(2*x);
- Dy = diff(y,x);
- reiksmes = [y(0)==0, Dy(0)==0];
- y_spr(x) = dsolve(lygtis, reiksmes)
- fplot(exp(2*x)/4 - exp(-6*x)/20 - (5^(1/2)*cos(2*x - atan(2)))/5, [-5 5])
- %% 3j
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,2) - 4*diff(y,x) + 13*y == 26*x + 5;
- Dy = diff(y,x);
- reiksmes = [y(0)==1, Dy(0)==0];
- y_spr(x) = dsolve(lygtis, reiksmes)
- fplot(2*x - (2*sin(3*x)*exp(2*x))/3 + 1, [-5 5])
- %% 3k
- clear all
- clc
- syms x y(x)
- lygtis = diff(y,x,2) - 4*diff(y,x) == 6*x^2 + 1;
- Dy = diff(y,x);
- reiksmes = [y(0)==2, Dy(0)==3];
- y_spr(x) = dsolve(lygtis, reiksmes)
- fplot((55*exp(4*x))/64 - (7*x)/16 - (3*x^2)/8 - x^3/2 + 73/64, [-5 5])
- %% 3l
- clear all
- clc
- syms t x(t) y(t)
- lygtis1 = diff(x,t) == 3*x + y;
- lygtis2 = diff(y,t) == 8*x + y;
- [x_spr(t) y_spr(t)] = dsolve([lygtis1 lygtis2]);
- x_spr(t) = simplify(x_spr(t))
- y_spr(t) = simplify(y_spr(t))
- for C1 = -3:3
- for C2 = -3:3
- fplot((C2*exp(5*t))/2 - (C1*exp(-t))/4, [-3 3])
- title('xspr(t)')
- hold on
- drawnow
- end
- end
- figure(2)
- for C1 = -3:3
- for C2 = -3:3
- fplot(C1*exp(-t) + C2*exp(5*t), [-3 3])
- title('yspr(t)')
- hold on
- drawnow
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement