椭圆周长公式
数值分析实验报告 专业 信息与计算科学 班级 信计101 姓名 学号 协作队员 实验日期 2013 年 1 月 5 日 星期 六 成绩评定 教师签名 批改日期 题目 一、 问题提出 教材136页12题用龙贝格求积算法计算其近似值(加速3次) 地球卫星轨道是一个椭圆,椭圆周长的计算公式是 Sa20c1sin2d a2这里a是椭圆的半长轴,c是地球中心与轨道中心(椭圆中心)的距离,记h为近地点距离,H为远地点距离,R=6371(km)为地球半径,则a(2RHh)/2,c(Hh)/2 我国第一颗人造地球卫星近地点距离h=439(km),远地点距离H=2384(km),试求卫星轨道的周长。 二、 模型建立 T(k)m4mh1(k1)(k) mTm()Tm,2, 11(h) , k1m41241 称为龙贝格求积算法当加速3次时,龙贝格求积算法如下: 641m3, 龙贝格积分公式: RnC2nCn.6363 三、 求解方法 #ifndef A #define A 1
#include "math.h" class T { public: }; template class Rombeg{ public : void Solve(double a,double b,int MAX_N,int DengFenShu,double e); double operator()(const double& x)const { } return (double)sin(x)/(1+x); private : }; #endif /*方法实现*/ #include "iostream" #include "LongBeiGe.h" #include "math.h" #define MAX_SIZE 255 using namespace std; template void Rombeg::Solve(double a,double b,int MAX_XunHuan,int DengFenShu,double e) { T R; double t[MAX_SIZE][MAX_SIZE]; int n=DengFenShu; double h=(b-a)/n; 2