请问怎么用matlab的fsolve函数怎么求解这个方程呢? 15
方程如下:(2*r-(8228485965250453*cos((pi*(a+72))/180))/2251799813685248)/(4*(r^2-(82284859...
方程如下:
(2*r - (8228485965250453*cos((pi*(a + 72))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a + 72))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a - 72))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a - 72))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*sin((pi*(a - 6))/180) - 2*r + (8228485965250453*sin((pi*(a + 6))/180))/2251799813685248)/(2*(r^2 - (8228485965250453*r*sin((pi*(a + 6))/180))/2251799813685248 - 2*r*sin((pi*(a - 6))/180) + 17817569595097215/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a - 144))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a - 144))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a + 144))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a + 144))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*a)/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*a)/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2))=0;
其中r是自变量,a是一个已知变量。我希望得到的结果里面r是由a和其他常数表示的。求大神解答。高分求解答。如果不用fsolve函数解决的也可以,求助 展开
(2*r - (8228485965250453*cos((pi*(a + 72))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a + 72))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a - 72))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a - 72))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*sin((pi*(a - 6))/180) - 2*r + (8228485965250453*sin((pi*(a + 6))/180))/2251799813685248)/(2*(r^2 - (8228485965250453*r*sin((pi*(a + 6))/180))/2251799813685248 - 2*r*sin((pi*(a - 6))/180) + 17817569595097215/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a - 144))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a - 144))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*(a + 144))/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*(a + 144))/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2)) - (2*r - (8228485965250453*cos((pi*a)/180))/2251799813685248)/(4*(r^2 - (8228485965250453*cos((pi*a)/180)*r)/2251799813685248 + 7517095976830443/2251799813685248)^(1/2))=0;
其中r是自变量,a是一个已知变量。我希望得到的结果里面r是由a和其他常数表示的。求大神解答。高分求解答。如果不用fsolve函数解决的也可以,求助 展开
1个回答
展开全部
满满的字,看着就怕。。。
(1)先将你的算式中的r用x(1)代替,a用x(2)代替。然后在前面加上f=@(x)并去掉后面的=0
(2)根据你的几何意义,找出一个满足你要求的可能点,比如r=1,a=0(或你的初始条件)(在全域可能具有无穷多解。给出初始点后,fslove将在这个点附近找满足方程的最近的一个解)
(3)运行fsolve(f,[1,0]),其中[1,0]为我找的初始条件,要按照[r,a]格式的都可以
全部程序如下
f=@(x)(2.*x(1) - (8228485965250453.*cos((pi.*(x(2) + 72))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) + 72))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) - 72))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) - 72))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*sin((pi.*(x(2) - 6))./180) - 2.*x(1) + (8228485965250453.*sin((pi.*(x(2) + 6))./180))./2251799813685248)./(2.*(x(1).^2 - (8228485965250453.*x(1).*sin((pi.*(x(2) + 6))./180))./2251799813685248 - 2.*x(1).*sin((pi.*(x(2) - 6))./180) + 17817569595097215./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) - 144))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) - 144))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) + 144))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) + 144))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*x(2))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*x(2))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2));
x0=fsolve(f,[1,0]);x0为解
(1)先将你的算式中的r用x(1)代替,a用x(2)代替。然后在前面加上f=@(x)并去掉后面的=0
(2)根据你的几何意义,找出一个满足你要求的可能点,比如r=1,a=0(或你的初始条件)(在全域可能具有无穷多解。给出初始点后,fslove将在这个点附近找满足方程的最近的一个解)
(3)运行fsolve(f,[1,0]),其中[1,0]为我找的初始条件,要按照[r,a]格式的都可以
全部程序如下
f=@(x)(2.*x(1) - (8228485965250453.*cos((pi.*(x(2) + 72))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) + 72))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) - 72))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) - 72))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*sin((pi.*(x(2) - 6))./180) - 2.*x(1) + (8228485965250453.*sin((pi.*(x(2) + 6))./180))./2251799813685248)./(2.*(x(1).^2 - (8228485965250453.*x(1).*sin((pi.*(x(2) + 6))./180))./2251799813685248 - 2.*x(1).*sin((pi.*(x(2) - 6))./180) + 17817569595097215./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) - 144))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) - 144))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*(x(2) + 144))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*(x(2) + 144))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2)) - (2.*x(1) - (8228485965250453.*cos((pi.*x(2))./180))./2251799813685248)./(4.*(x(1).^2 - (8228485965250453.*cos((pi.*x(2))./180).*x(1))./2251799813685248 + 7517095976830443./2251799813685248).^(1./2));
x0=fsolve(f,[1,0]);x0为解
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询