1. Бабешко В.А Динамика неоднородных линейно-упругих сред/
В.А. Бабешко, Е.В. Глушков, Ж.Ф. Зинченко.– М. Наука. 1989.
2. Гантмахер Ф.Р. Теория матриц – М. Наука. 1988.
3. Фаддеев Д.К. Вычислительные методы линейной алгебры/
Д.К. Фаддеев, В.Н. Фаддеева – М. 1960.
4. Демидович Б.П. Основы вычислительной математики/
Б.П. Демидович, И.А. Марон.– М.Наука.1970.
4
ПРИЛОЖЕНИЕ 2
#include <iostream.h>
#include <math.h>
double alpha(double x,double b)
double talpha=sqrt(x*x-b*b);
return talpha;
double alpha1(double d)
double talpha=sqrt(fabs(d));
return talpha;
double s(double x,double b)
double ss=0.5*x-b*b;
return ss;
double f(double b,double a31,double a32,double s)
double fff=a32*a32*b*b*(a31*a31+s)+a31*a32*(b*b*b*b+s*a32*a32);
return fff;
double ff(double b,double a12,double a1,double a2,double s)
double kk=a2*b*b*(a1+s)+a12*(b*b*b*b+s*a2);
return kk;
double compl(double x,double b)
double g=x*x-b*b;
return g;
void koren(double b,double w)
cout<<"При w="<<w<<"есть корень, равный "<<b<<endl;
void main()
{
double p,tt,t,k,r=0.0,bb=0,e=0.001,amega=10.0,betta=0.0,c1=5.6,c2=3.5,c,x,x1=0,x2=0,s1=0;
double h_betta=0.1,h_amega=0.1,func1,func2;
double f(double,double,double,double);
double compl(double,double);
double ff(double,double,double,double,double);
int v=0;
amega=h_amega;
do {
amega+=h_amega;
betta=h_betta;
x1=amega/c1;
x2=amega/c2;
do {
c=betta;
do {
betta+=h_betta;
if (betta>x1) betta=x2+h_betta;
else
{
func1=f(betta, alpha(x1,betta), alpha(x2,betta), s(x2,betta));
if (func1==0)
{koren(betta,amega);v=1;}
}
bb=betta+h_betta;
if (bb>x1)
bb=x2+h_betta;
else
{
func2=f(bb, alpha(x1,bb), alpha(x2,bb), s(x2,bb));
if (func2==0)
{koren(bb,amega);v=1;}
}
if (func1*func2<0)
{x=(betta+bb)/2;
r=f(x,alpha(x1,x),alpha(x2,x),s(x2,x));
if (r*func1<0)
bb=x;betta=bb;
if (r*func2<0) betta=x;
if (r*func1==0)
{koren(betta,amega);v=1;}
}
if (betta>x2&&betta<2*x2)
{
t=compl(x1,betta);
tt=compl(x2,betta);
func1=ff(betta, alpha1(t*tt), alpha1(t*t), alpha1(tt*tt), s(x2,betta));
if (func1==0)
{koren(betta,amega);v=1;}
bb+=h_betta;
if (bb<2*x2)
{
t=compl(x1,bb);
tt=compl(x2,bb);
func2=ff(bb, alpha1(t*tt), alpha1(t*t), alpha1(tt*tt), s(x2,bb););
if (func2==0) {koren(bb,amega);v=1;}
if (func1*func2<0)
{
x=(betta+bb)/2;
r=f(x,alpha1(compl(x1,x)),alpha1(compl(x2,x)),s(x2,x));
if (r*func1<0) bb=x;betta=bb;
if (r*func2<0) betta=x;
if (r*func1==0) {koren(x,amega);v=1;}
}
while (r>e|v==0|betta<2*x2);
betta=c;
}
while (betta<2*x1);
}
while (amega<10);
if (v==0) cout<<"в данном уравнении нет вещественных корней!"<<endl;
}
ПРИЛОЖЕНИЕ 3
#include <fstream.h>
#include <iostream.h>
#include <math.h>
#include <complex.h>
#include <io.h>
#include <process.h>
double alpha31(double x,double a1,double a2)
{ double talpha;
talpha=sqrt(fabs(x*x-a1*a1-a2*a2));
return talpha;}
double s(double x,double a1,double a2)
{ double ss=0.5*x-a1*a1-a2*a2;
return ss;}
double cabs(double x,double y)
{ double g=sqrt(x*x+y*y);
return g;}
complex det(double a1,double a2, double a31,double a32,double s, double \
h1,double h2,double h3)
{ complex det1[9],det2;
complex ii(0,1);
complex x12=exp(ii*ii*a31*(h2-h1));
complex x13=exp(ii*ii*a31*(h3-h1)),x21=exp(ii*ii*a31*(h2-h1)),\
x32=exp(ii*ii*a31*(h2-h3));
complex x23=exp(ii*ii*a31*(h3-h2)),x31=exp(ii*ii*a31*(h1-h3));
complex y12=exp(ii*ii*a32*(h2-h1)),y13=exp(ii*ii*a32*(h3-h1)),\
y21=exp(ii*ii*a32*(h2-h1)),y32=exp(ii*ii*a32*(h2-h3));
complex y23=exp(ii*ii*a32*(h3-h2)),y31=exp(ii*ii*a32*(h1-h3));
complex A[9][9];
complex delta1=s*a31+a32*(a1*a1+a2*a2);
complex delta2=a32*a32*(a1*a1+a2*a2)*(a31*a31+s)+a31*a32*(a1*a1+\
a2*a2+s*a32*a32);
complex M[9][9]={{(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*\
(a31-a32)/delta2,0,(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*\
(a31-a32)/delta2,0,(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*\
(a31-a32)/delta2,0,},\
{a2*(2*a1*a1-a32*a32)/(a1*delta1),2*(a1*a1*a31+a32*(a2*a2+s))/delta2,0,\
a2*(2*a1*a1-a32*a32)/(a1*delta1),2*(a1*a1*a31+a32*(a2*a2+s))/delta2,0,\
a2*(2*a1*a1-a32*a32)/(a1*delta1),2*(a1*a1*a31+a32*(a2*a2+s))/delta2,0},\
{0,0,1/delta1,0,0,1/delta1,0,0,1/delta1},\
{(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0,\
(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0,\
(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0},\
{a2*(2*a1*a1-a32*a32)/(a1*delta1),2*(a1*a1*a31+a32*(a2*a2+s))/delta2,0},\
{0,0,1/delta1,0,0,1/delta1,0,0,1/delta1},\
{(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0,\
(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0,\
(a31*(2*a2*a2+a32*a32)+a32*(a1*a1-a2*a2))/delta2,2*a1*a2*(a31-a32)/delta2,0},\
{a2*(2*a1*a1-a32*a32)/(a1*delta1),2*(a1*a1*a31+a32*(a2*a2+s))/delta2,0},\
{0,0,1/delta1,0,0,1/delta1,0,0,1/delta1}};
complex N[9][9]={{1,0,0,1/2*((a1*a1*x12)+(a2*a2+a31*a32)*y12),a1*a2*(x12-y12)/2,\
a1*a32*(x12-y12)/2,1/2*((a1*a1*x13)+(a2*a2+a31*a32)*y13),a1*a2*(x13-y13)/2,\
a1*a32*(x13-y13)/2},\
{0,1,0,a1*a2*(x12-y12)/2,1/2*(a2*a2*x12+(a1*a1+a31*a32)*y12),a2*a32*(x12-y12)/2,\
a1*a2*(x13-y13)/2,1/2*(a2*a2*x13+(a1*a1+a31*a32)*y13),a2*a32*(x13-y13)/2},\
{0,0,1,a1*a31*(x12-y12)/2,a2*a31*(x12-y12)/2,(a31*a32*x12+(a1*a1+a2*a2)*y12)/2,\
a1*a31*(x12-y12)/2,a2*a31*(x12-y12)/2,(a31*a32*x12+(a1*a1+a2*a2)*y12)/2},\
{(a1*a1*x21+(a2*a2+a31*a32)*y21)/2,a1*a2*(x21-y21)/2,a1*a32*(y21-x21)/2,1,0,0,\
1/2*((a1*a1*x23)+(a2*a2+a31*a32)*y23),a1*a2*(x23-y23)/2,a1*a32*(x12-y23)/2},\
{a1*a2*(x21-y21)/2,(a2*a2*x21+(a1*a1+a31*a32)*y21)/2,a2*a32*(y21-x21)/2,0,1,0,\
a1*a2*(x23-y23)/2,1/2*(a2*a2*x23+(a1*a1+a31*a32)*y23),a2*a32*(x23-y23)/2},\
{a1*a31*(y21-x21)/2,a2*a31*(y21-x21)/2,(a31*a32*x21+(a1*a1+a2*a2)*y21)/2,0,0,1,\
a1*a31*(x23-y23)/2,a2*a31*(x23-y23)/2,(a31*a32*x23+(a1*a1+a2*a2)*y23)/2},\
{(a1*a1*x31+(a2*a2+a31*a32)*y31)/2,a1*a2*(x31-y31)/2,a1*a32*(y31-x31)/2,\
(a1*a1*x32+(a2*a2+a31*a32)*y32)/2,a1*a2*(x32-y32)/2,a1*a32*(y32-x32)/2,1,0,0},\
{a1*a2*(x31-y31)/2,(a2*a2*x31+(a1*a1+a31*a32)*y31)/2,a2*a32*(y31-x31)/2,a1*a2*(x32-y32)/2,(a2*a2*x32+(a1*a1+a31*a32)*y32)/2 ,a2*a32*(y32-x32)/2,0,1,0},{a1*a31*(y31-x31)/2,a2*a31*(y31-x31)/2,(a31*a32*x31+(a1*a1+a2*a2)*y31)/2,\
a1*a31*(y32-x32)/2,a2*a31*(y32-x32)/2,(a31*a32*x32+(a1*a1+a2*a2)*y32)/2,0,0,1.0}};
complex C[9][9];
for (int t=0;t<9;t++){
for (int r=0;r<9;r++){
for (int q=0;q<9;++q){
C[t][r]+=M[t][q]*N[q][r];} } }
det1[0]=C[0][0];
int k=0;
int u=9;
int j;
int i;
for (k=0;k<u-1;k++)
{ for (i=k;i<u;i++)
{ for (j=k;j<u;j++)
{ A[i][j]=C[i][j]-C[i][k]*C[k][j]/C[k][k];}
det1[k+1]=A[k][k]*det1[k];
for (i=k;i<u;i++)
{ for (j=k;i<u;i++)
{ C[i][j]=A[i][j]; } } }
complex d1=det1[u];
cout<<"determinant="<<cabs(real(d1),imag(d1))<<endl;
return d1;
}
struct element
{float zn;};
ofstream& operator <<(ofstream& out,element el)
{ out<<" "<<el.zn<<endl;
return out;}
double main()
{ double h1,h2,h3,amega=20.0,alpha1=0.0,alpha2=0.0,c1=1.5,c2=5.6,x1=0.0,x2=0.0,\
s1=0.0,h_alpha1=0.01,h_alpha2=0.01,h_amega=0.01;
complex func1,func2;
complex f(double,double,double,double);
double s(double,double,double);
double alpha31(double,double,double);
double cabs(double,double);
char ans;
do{
ofstream file1("data.txt",ios::trunc);
cout<<endl<<"h1=";
cin>>h1;
cout<<endl;
cout<<"h2=";
cin>>h2;
cout<<endl<<"h3=";
cin>>h3;
alpha1=h_alpha1;
alpha2=h_alpha2;
x1=amega/c1;
x2=amega/c2;
do{
func1=det(alpha1,alpha2,alpha31(x1,alpha1,alpha2),\
alpha31(x2,alpha1,alpha2),s(x2,alpha2,alpha2),h1,h2,h3);
ofstream file1("data.txt",ios::app);
if (!file1)
{cerr<<"Error open file!";
return 1;}
file1<<alpha1<<" "<<cabs(real(func1),imag(func1))<<endl;
alpha1+=h_alpha1;
alpha2+=h_alpha2; }
while (alpha1<(2*x2));
file1.close();
cout<<" Press 'N' for QUIT ";
cin>>ans; }
while (ans!='N');
}