2个回答
展开全部
你好,程序如下,可以直接复制到MATLAB中运行,就有结果。
%第7题
eq=dsolve('D2y -3*Dy+2*y=x', 'y(0) = 1', 'Dy(0) = 0','x');
y=inline(eq);
result=y(0.5)
%第8题
[x,y]=solve('x^2+y^2=1','x*y=2','x','y')
结果:
第7题:0.6100。
第8题:
x =
(1/2 + (15^(1/2)*i)/2)^(1/2)/2 - (1/2 + (15^(1/2)*i)/2)^(3/2)/2
- (1/2 + (15^(1/2)*i)/2)^(1/2)/2 + (1/2 + (15^(1/2)*i)/2)^(3/2)/2
(1/2 - (15^(1/2)*i)/2)^(1/2)/2 - (1/2 - (15^(1/2)*i)/2)^(3/2)/2
- (1/2 - (15^(1/2)*i)/2)^(1/2)/2 + (1/2 - (15^(1/2)*i)/2)^(3/2)/2
y =
(1/2 + (15^(1/2)*i)/2)^(1/2)
-((15^(1/2)*i)/2 + 1/2)^(1/2)
(1/2 - (15^(1/2)*i)/2)^(1/2)
-(1/2 - (15^(1/2)*i)/2)^(1/2)
%第7题
eq=dsolve('D2y -3*Dy+2*y=x', 'y(0) = 1', 'Dy(0) = 0','x');
y=inline(eq);
result=y(0.5)
%第8题
[x,y]=solve('x^2+y^2=1','x*y=2','x','y')
结果:
第7题:0.6100。
第8题:
x =
(1/2 + (15^(1/2)*i)/2)^(1/2)/2 - (1/2 + (15^(1/2)*i)/2)^(3/2)/2
- (1/2 + (15^(1/2)*i)/2)^(1/2)/2 + (1/2 + (15^(1/2)*i)/2)^(3/2)/2
(1/2 - (15^(1/2)*i)/2)^(1/2)/2 - (1/2 - (15^(1/2)*i)/2)^(3/2)/2
- (1/2 - (15^(1/2)*i)/2)^(1/2)/2 + (1/2 - (15^(1/2)*i)/2)^(3/2)/2
y =
(1/2 + (15^(1/2)*i)/2)^(1/2)
-((15^(1/2)*i)/2 + 1/2)^(1/2)
(1/2 - (15^(1/2)*i)/2)^(1/2)
-(1/2 - (15^(1/2)*i)/2)^(1/2)
展开全部
1-6
syms y(x);
Dy = diff(y);
D2y = diff(y,2);
f(x) = symfun(dsolve(D2y - 3*Dy + 2*y == x, y(0)==1, Dy(0)==0), x);
res = subs(f(0.5));
答案为:0.6100
1-8
syms x y;
[t1 t2]=solve(x*x+y*y==1, x*y==2);
ans = [subs(t1) subs(t2)];
答案为:
% x,y可交换
ans =
1.1180 - 0.8660i 1.1180 + 0.8660i
-1.1180 + 0.8660i -1.1180 - 0.8660i
1.1180 + 0.8660i 1.1180 - 0.8660i
-1.1180 - 0.8660i -1.1180 + 0.8660i
syms y(x);
Dy = diff(y);
D2y = diff(y,2);
f(x) = symfun(dsolve(D2y - 3*Dy + 2*y == x, y(0)==1, Dy(0)==0), x);
res = subs(f(0.5));
答案为:0.6100
1-8
syms x y;
[t1 t2]=solve(x*x+y*y==1, x*y==2);
ans = [subs(t1) subs(t2)];
答案为:
% x,y可交换
ans =
1.1180 - 0.8660i 1.1180 + 0.8660i
-1.1180 + 0.8660i -1.1180 - 0.8660i
1.1180 + 0.8660i 1.1180 - 0.8660i
-1.1180 - 0.8660i -1.1180 + 0.8660i
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询