找回密码
 注册
Simdroid-非首页
查看: 109|回复: 5

超越方程组

[复制链接]
发表于 2010-12-17 09:46:23 | 显示全部楼层 |阅读模式 来自 黑龙江哈尔滨
我想解以下超越方程组:(y*tanh(x)*(1+tan(y)*tan(y))-x*tan(y)*(1-tanh(x)*tanh(x)))/(x*x+y*y)*(1+tanh(x)*tanh(x)*tan(y)*tan(y))-0.3573=0;
x*tanh(x)*(1+tan(y)*tan(y))+y*tan(y)*(1-tanh(x)*tanh(x)))/(x*x+y*y)*(1+tanh(x)*tanh(x)*tan(y)*tan(y))-0.7878=0;
利用迭代方法,假设初值定为[1,0.1],不知道MATLAB怎么实现?
发表于 2010-12-17 10:40:47 | 显示全部楼层 来自 湖南湘潭
Simdroid开发平台
题目有误,第二个方程多了个)
eqn1 := (y*tanh(x) * (1 + tan(y)*tan(y)) - x*tan(y) * (1 - tanh(x)*tanh(x)))/(x*x + y*y) * (1 + tanh(x)*tanh(x)*tan(y)*tan(y)) - 0.3573 = 0;
eqn2 := x*tanh(x) * (1 + tan(y)*tan(y)) + y*tan(y) * (1 - tanh(x)*tanh(x)))/(x*x + y*y) * (1 + tanh(x)*tanh(x)*tan(y)*tan(y)) - 0.7878 = 0;
迭代方法有很多种,你想用哪一种?Matlab只是个实现算法的工具。它可能有许多已经封装好的函数,但也要根据需要去选择。
如果不是搞算法研究,可以直接调用Matlab中的符号工具箱,得出结果:
{x = - 0.7281223581 , y = - 5.472980422}

评分

1

查看全部评分

回复 不支持

使用道具 举报

发表于 2010-12-17 10:44:20 | 显示全部楼层 来自 河北廊坊
  1. function F=myfun(x)
  2. F=[(x(2).*tanh(x(1)).*(1+tan(x(2)).*tan(x(2)))-x(1).*tan(x(2)).*(1-tanh(x(1)).*tanh(x(1))))./(x(1).*x(1)+x(2).*x(2)).*(1+tanh(x(1)).*tanh(x(1)).*tan(x(2)).*tan(x(2)))-0.3573;
  3. x(1).*tanh(x(1)).*(1+tan(x(2)).*tan(x(2)))+x(2).*tan(x(2)).*(1-tanh(x(1)).*tanh(x(1)))./(x(1).*x(1)+x(2).*x(2)).*(1+tanh(x(1)).*tanh(x(1)).*tan(x(2)).*tan(x(2)))-0.7878];
复制代码
  1. >> [x,fval] = fsolve(@myfun,[1,0.1])

  2. No solution found.

  3. fsolve stopped because the problem appears regular as measured by the gradient,
  4. but the vector of function values is not near zero as measured by the
  5. default value of the function tolerance.

  6. <stopping criteria details>


  7. x =

  8.     0.6510    0.5380


  9. fval =

  10.    -0.1125
  11.     0.0554

  12. >>
复制代码
回复 不支持

使用道具 举报

 楼主| 发表于 2010-12-25 19:33:18 | 显示全部楼层 来自 黑龙江哈尔滨
谢谢楼上两位帮助!
回复 不支持

使用道具 举报

 楼主| 发表于 2010-12-25 19:57:49 | 显示全部楼层 来自 黑龙江哈尔滨
我的方程错了,改了方程以后发现你这种方法运行时总是出现error,不知道怎么回事?能否解释一下?正确方程是这样的:
(y*tanh(x) * (1 + tan(y)*tan(y)) - x*tan(y) * (1 - tanh(x)*tanh(x)))/((x*x + y*y) * (1 + tanh(x)*tanh(x)*tan(y)*tan(y))) - 0.3573 = 0;
(x*tanh(x) * (1 + tan(y)*tan(y)) + y*tan(y) * (1 - tanh(x)*tanh(x)))/((x*x + y*y) * (1 + tanh(x)*tanh(x)*tan(y)*tan(y))) - 0.7878 = 0;

3# qibbxxt
回复 不支持

使用道具 举报

 楼主| 发表于 2010-12-25 20:10:18 | 显示全部楼层 来自 黑龙江哈尔滨
可以了,谢谢哈!
5# fdttsh
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-29 02:33 , Processed in 0.049225 second(s), 16 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表