解含待定变量微分方程组

clear
syms x(t) y(t);
a = 3
b = 2
Dx = diff(x)
Dy = diff(y)
f1 = sym('Dx- a*x + b*y = 0');
f2 = sym('Dy - b*x + y = 0');
f1 = subs(f1)
f2 = subs(f2)
[x,y] = dsolve(f1,f2)



解得:

x =
 
C1*exp(t) + (C2*exp(t))/2 + C2*t*exp(t)
 
 
y =
 
C1*exp(t) + C2*t*exp(t)


clear
syms y(t) k m;
c=3;
Dy=diff(y);
D2y=diff(y,2);
f1=sym('D2y=k/m*(Dy)^2+c');
f1=subs(f1);
dsolve(f1)

解得:

ans =
 
 C17 + (3^(1/2)*(-m)^(1/2)*t)/k^(1/2)
 C15 - (3^(1/2)*(-m)^(1/2)*t)/k^(1/2)



你可能感兴趣的:(解含待定变量微分方程组)