Qarshi davlat universiteti fizika matematika fakulteti


using System; namespace



Download 2,59 Mb.
bet17/17
Sana31.12.2021
Hajmi2,59 Mb.
#267346
1   ...   9   10   11   12   13   14   15   16   17
Bog'liq
Abdixakimov Farrux

using System;

namespace Zeydel_usuli
{
    class Program
    {
        public static void Main(string[] args)
        {double x0, y0, x1=0, y1=0, e, M1, M2;
/*nochiziqli tenglamalar sisitemasini yechish uchun Zeydel usuli */
        /*x=f1(x,y)=x-F(x,y)/M1;
        y=f2(x,y)=y-G(x,y)/M2;
        F(x,y)=2*sin(x+1)-y-0,5;
        G(x,y)=10*cos(y-1)-x+0,4;*/
        Console.Write("BOSHLANICH YAQINLASHISHNI KIRITING x0=");
        x0=double.Parse(Console.ReadLine());
        Console.Write("BOSHLANICH YAQINLASHISHNI KIRITING y0=");
        y0=double.Parse(Console.ReadLine());
        Console.Write("XATOLIKNING ANIQLIK DARAJASINI KIRITING e=");
        e=double.Parse(Console.ReadLine());
        Console.Write("FUNKSIYANING CHEGARASINI KIRITING M1=");
        M1=double.Parse(Console.ReadLine());
        Console.Write("FUNKSIYANING CHEGARASINI KIRITING M2=");
        M2=double.Parse(Console.ReadLine());
        {x1=x0;y1=y0;
        x1=x1-(2*Math.Sin(x1+1)-y1-0.5)*1.0/M1;
        y1=y1-(10*Math.Cos(y1-1)-x1+0.4)*1.0/M2;}
        while(Math.Abs(x1-x0)Abs(y1-y0)           Console.WriteLine("x1="+x1);
           Console.WriteLine("y1="+y1);
           Console.ReadKey(true);
        }
    }
}

Trapetsiya usuli uchun C++ tilida tuzilgan dastur kodi

#include

#include

//Aniq integralni hisoblashning Trapetsiya usuli

//f(x)=exp(-x*x) funksiya uchun [0,1] oraliq uchun dastur kodi

using namespace std;

int main()

{int a, b, n;

cout<<"Aniq integral chegaralarini kiriting:"<

cout<<"a="; cin>>a;

cout<<"b="; cin>>b;

cout<<"Bo'laklashlar sonini kiriting:"<

cout<<"n="; cin>>n;

double h=1.0*(b-a)/n;

double S=0;

for(int k=1; k

{

S=S+exp(-(a+k*h)*(a+k*h));



}

double T=S+(exp(-a*a)+exp(-b*b))/2.0;

T=T*h;

cout << "Trapetsiya usulining qiymati: "<<"T="<

return 0;

}

Simpson usuli uchun C++ tilida tuzilgan dastur kodi

#include

#include

//Aniq integrallarni hisoblash uchun Simpson Formulasi dasturi

//f(x)=exp(-x*x) funksiya uchun [0,1] oraliq uchun

using namespace std;

int main()

{int a, b, n;

cout<<"Aniq integral chegaralarini kiriting:"<

cout<<"a="; cin>>a;

cout<<"b="; cin>>b;

cout<<"Bo'laklashlar sonini kiriting:"<

cout<<"n="; cin>>n;

int m=n/2;

double h=1.0*(b-a)/(2*m);

double y=exp(-a*a)+exp(-b*b);

double y1=0;

for(int k=1; k<=m-1; k++)

{

y1=y1+exp(-(a+2*k*h)*(a+2*k*h));



}

double y2=0;

for(int k=1; k<=m; k++)

{

y2=y2+exp(-(a+(2*k-1)*h)*(a+(2*k-1)*h));



}

double S=(h*1.0/3)*(y+2*y1+4*y2);

cout<<"Simpson formulasi uchun natija quyidagicha: "<<"S="<

return 0;

}



Mavzu: Oddiy differensial tenglama uchun Koshi masalasining qo’yilishi. Runge-Kutta usuli bilan yechish va uning dasturi

1-tartibli differensial tenglamalarni Runge-Kutta usulining C++ tilida tuzilgan dastur kodi

#include

//y'=x*x+y 1-tartibli diff tenglama uchun

using namespace std;

int main()

{double a, b, x0, y0, h=0, k, k1, k2, k3;

int n;


cout <<"Berilgan kesmaning quyi chegarasini kiriting:"<cout<<"a="; cin>>a;

cout <<"Berilgan kesmaning yuqori chegarasini kiriting:"<

cout<<"b="; cin>>b;

cout<<"Koshi masalasi argumenti kiriting:"<

cout<<"x0="; cin>>x0;

cout<<"Koshi masalasi funksiya qiymatini kiriting:"<

cout<<"y0="; cin>>y0;

cout<<"Berilgan [a,b] kesmani bo'laklashlar soni kiriting:"<

cout<<"n="; cin>>n;

h=(b-a)/(n*1.0);

//y'=x*x+y berilgan tenglama

double F[n+1];

F[0]=y0;


cout<<"F[0]="<<" "<int i=1; double j=a;

I: k=h*(j*j+y0);

k1=h*((j+h/2.0)*(j+h/2.0)+(y0+k/2.0));

k2=h*((j+h/2.0)*(j+h/2.0)+(y0+k1/2.0));

k3=h*((j+h)*(j+h)+(y0+k2));

F[i]=y0+(k+2*k1+2*k2+k3)/6.0;

y0=F[i];


cout<<"F["<i++; j+=h;

while(i

return 0;

}



Mavzu: Giperbolik tipdagi tenglamalarni yechish oshkor sxema uchun C++ tilida tuzilgan dastur kodi

#include

#include

#include

using namespace std;

double f1(double x) {

return x * x;

}

double f2(double x) {



return 0;

}

double p1(double x) {



return x * x;

}

double p2(double x) {



return (1 + x * x);

}

double f(double x, double t) {



return 0;

}

int main() {



const int n = 10, m = 100;

double a, b, T, x = 0, u[n + 1][n + 1], t;

cin >> a >> b >> T;

double h = (b - a) / n;

double tao = T / m;

for (int i = 0; i < n; i++) {

x = a + i * h;

u[i][0] = f1(x);

u[i][1] = u[i][0] + tao * f2(x);

}

for (int j = 2; j <= m; j++) {



t = j * tao;

u[0][j] = p1(t);

u[n - 1][j] = p2(t);

}

int al[1001], ai, bi, be[1001], ci, fi;



cout << "Tabribiy yechim,\t Aniq yechim,\t Xatolik";

for (int j = 1; j <= m - 1; j++) {

t = j * tao;

u[0][j] = p1(t);

u[n - 1][j] = p2(t);

al[1] = 0;

be[1] = p1(t);

for (int i =1; i <= n - 1; i++) {

x = a + i * h;

u[i][0] = f1(x);

u[i][1] = u[i][0] + tao * f2(x);

ai = tao * tao / (h * h);

bi = 2 * tao * tao / (h * h) + 1;

ci = tao * tao / (h * h);

fi = -f(x, t) * tao * tao - 2 * u[i][j] + u[i][j - 1];

al[i + 1] = ai / (bi - ci * al[i]);

be[i + 1] = (ci * be[i] - fi) / (bi - ci * al[i]);

}

for (int i = n - 1; i >= 1; i--) {



u[i][j] = al[i + 1] * u[i + 1][j + 1] + be[i + 1]; }

if (j == 10 || j == 20 || j == 50 || j == 99) {

cout << fixed << setprecision(8) << "t = " << j * tao << '\t' << endl;

for (int i = 0; i < n; i++) {

x = a + i * h;

cout << fixed << setprecision(8) << u[i][j] << '\t' << (x * x + t * t) << '\t' << abs(u[i][j] - (x * x + t *t)) << endl; }

cout << "Xayitmurdov Shodiyor"; }



Mavzu: Elliptik tipdagi tenglamalarni oshkormas sxemalar yordamida yechishning C++tilida dastur kodi

#include

using namespace std;

int k, i, j;

double a, b, c, d, q, h, x, y;

double f1(double y) {

return pow(y, 2);

}

double f2(double y) {



return 2 + pow(y, 2);

}

double f3(double x) {



return 2*pow(x, 2);

}

double f4(double x) {



return 1 + 2*pow(x, 2);

}

double f(double x, double y) {



return 0 * x + 0 * y + 6;

}

int main() {



const int n = 10, m = 10;

const double e = 0.001;

double p[n][m], v[n][m], u[n][m];

h = 0.1; a = 0; b = 1; c = 0; d = 1;

for (int j = 0; j < m; j++) {

y = a + i * h;

u[0][j] = f1(y);

u[n - 1][j] = f2(y);

v[0][j] = u[0][j];

v[n - 1][j] = u[n - 1][j];

}

for (int i = 0; i < m; i++) {



y = c + j * h ;

u[i][0] = f3(x);

u[i][m - 1] = f4(y);

v[i][0] = u[i][0];

v[i][m - 1] = u[i][m - 1];

}

k = 0;



for (int i = 1; i < n - 1; i++) {

for (int j = 1; j < m - 1; j++) {

u[i][j] = 0;

v[i][j] = u[i][j];

}

}

do {



for (int i = 1; i < n - 1; i++) {

x = a + i * h;

for (int j = 1; j < m - 1; j++) {

y = c + j * h;

u[i][j] = (1.0 / 4) * (u[i-1][j] + v[i + 1][j] + v[i][j + 1] + u[i][j - 1])-h * h / 4 * f(x, y);

p[i][j] = abs(u[i][j] - v[i][j]);

}

}

k = k + 1;



q = p[1][1];

for (int i = 1; i < n-1; i++) {

for (int j = 1; j < n - 1; j++) {

if (q < p[i][j]) {

q = p[i][j];

}

}



}

for (int i = 1; i < n-1; i++) {

for (int j = 1; j < n - 1; j++) {

v[i][j] = u[i][j];

}

}

} while (q < e);



for (int i = 0; i < n; i++) {

if (i == 1 || i == 5 || i == 10) {

for (int j = 0; j < m; j++) {

cout << fixed<< setprecision(8) << u[i][j] << "; --> " << pow((i * h), 2) + pow((j * h ), 2);

}

cout << endl;



}

}

cout<<"Xayitmurodov Shodiyor";



return 0;

}



Xulosa

Biz bu malakaviy amliyotni o’tash davomida quyidagicha bilimlarga ega bo’ldik. Windows operatsion tizimi bilan tanishib chiqdik, men bu hisobatni yozishda Windows 10 operatsion sistemasini o’rnatishni ko’rib chiqdik va uni o’rnatish bosqichlarini ketma-ket ravishda rasm va izohlar bilan keltirib o’tdim. Va undan so’ng esa operatsion tizimlarda fayl tizimi bilan ishlash bo’yicha bir qancha kerakli faktlarni ko’rib chiqdik, bunda fayl tizimi nima va u qanday vazifalar bajarishi, faylli tizim nima va uning qanday afzalliklari borligi bilan keng manoda tanishib o’tdik. Keyingi o’tgan mavzularimizda "Панель Управления" bilimi bilan tanishib chiqdik va unda qanday sozlamalar bajarilishi izoh va rasmlar orqali ko’rsatish bilan tushuntirib o’tdik. Hisoblash usullari bo’yicha esa oldingi maruzalarda ko’rib o’tgan taqribiy hisoblashlar orqali ko’rib o’tgan usullarimizni amalda dasturini tuzdik va bu dasturlar hisoblashlarni juda ham osonlashtirishini ko’rib o’tdik, va bu usullar bo’yicha dasturlarni va undan chiqgan natijalar bu hisobotga keltirib o’tdim. Men bu malakaviy amaliyot o’tash davomida o’zimga kerakli bilimlarga ega bo’ldim va bu olgan bilimlarni amaliyotda sinab ko’rdim va bu olgan bilimlar kelajakda asqotadi. Shu o’tgan mavzular bo’yicha hisobotni ozmi ko’pmi yorita oldim.






Download 2,59 Mb.

Do'stlaringiz bilan baham:
1   ...   9   10   11   12   13   14   15   16   17




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish