4-Amaliy ish Mavzu: Taqribiy integrallash usullari. Zaruriy aniqlikni ta’minlovchi qadamni tanlash
Download 0.76 Mb.
|
4-amaliy topshiriq
4-Amaliy ish Mavzu: Taqribiy integrallash usullari. Zaruriy aniqlikni ta’minlovchi qadamni tanlash 1.Chap to’rtburchak usuli #include #include using namespace std; int main(){ double a,b,N; cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"N="; cin>>N; double h=(b-a)/N; double x=a; double S=pow((0.4*x*x+1.5),1.0/2)/(2.5+pow((2*x+0.8),1.0/2)); for (int i=1;i S=S+pow((0.4*x*x+1.5),1.0/2)/(2.5+pow((2*x+0.8),1.0/2)); } S=S*h; cout<<"S="< 2.O’ng to’rtburchak usuli #include #include using namespace std; int main(){ double a,b,N; cout<<"a="; cin>>a; cout<<"b="; cin>>b; cout<<"N="; cin>>N; double h=(b-a)/N; double x=b; double S=pow((0.4*x*x+1.5),1.0/2)/(2.5+pow((2*x+0.8),1.0/2)); for (int i=1;i #include double h=(b-a)/N; for (int i=1;i 1.Chap to’rtburchak usuli #include double h=(b-a)/N; double S=cos(a*a+0.8)/(1.5+sin(0.6*a+0.5)); for (int i=1;i #include double h=(b-a)/N; double S=cos(b*b+0.8)/(1.5+sin(0.6*b+0.5)); for (int i=1;i #include double h=(b-a)/N; double S=0; for (int i=1;i |
ma'muriyatiga murojaat qiling