Нахождение
интегралов в среде Pascal
Текст задания:
найти
интеграл функции sin (x+10)+x4=0 используя два метода: метод прямоугольников и
метод трапеций; пользователь вводит значения и выбирает метод решения.
Текст программы:
program
LW_5;
uses
Crt;
var
dx,
x1, x2, e, i, c, s:real;
function
Fx (x:real):real;
begin
Fx:=sin
(x+10)+x*x*x*x; {function}
end;
procedure
CountViaBar;
var
xx1,
xx2:real;
c:longint;
begin
writeln
('–');
writeln
('–>MEthod PRYAMOUGOL''NIKOVVVV');
writeln
('vsego interaciy:', round (abs(x2-x1)/e));
i:=0;
for
c:=1 to round (abs(x2-x1)/e) do begin
write
('integration ', c, chr(13));
xx1:=Fx
(x1+c*e);
xx2:=Fx
(x1+c*e+e);
i:=i+abs
(xx1+xx2)/2*e;
end;
writeln
('–');
writeln
('INTEGRAL=', i);
end;
procedure
CountViaTrap;
var
xx1,
xx2, xx3:real;
c:longint;
begin
writeln
('–');
writeln
('–>MEthod TRAPECIY');
writeln
('vsego interaciy:', round (abs(x2-x1)/e));
i:=0;
for
c:=1 to round (abs(x2-x1)/e) do begin
write
('Integration ', c, chr(13));
xx1:=Fx
(x1+c*e);
xx2:=Fx
(x1+c*e+e);
if
xx2>xx1 then xx3:=xx1 else xx3:=xx2;
i:=i+abs
(xx2-xx1)*e+abs(xx3)*e;
end;
writeln
('–');
writeln
('INTEGRAL=', i);
end;
begin
clrscr;
writeln
('vvedite ishodniye zna4eniya:');
write
('NA4AL''NOYE ZNE4ENIYE x (x1)='); Readln(x1);
write
('KONE4NOYE ZNA4ENIYE x (x2)='); Readln(x2);
write
('TO4NOST'' VbI4ISLENIY (e)='); Readln(e);
writeln
('–======vvedite metod====== – :');
writeln
('DLYA METODA PRYAMOUGOL''NIKOV VVEDITE 1, DLYA METODA TRAPECIY VVEDITE 2');
//writeln
('DLYA METODA TRAPECIY VVEDITE 2');
readln
(s);
if
s=1 then begin
CountViaBar;
end;
if
s=2 then begin
CountViaTrap;
end;
readln;
end.
Другие работы по теме:
Автоматизированния система обучения программированию
Актуальной проблемой совершенствования учебного процесса является разработка программного обеспечения для его проведения. Очевидным пробелом является почти полное отсутствие средств обучения основам программирования.
Приближенное вычисление интеграла
Содержание Введение 2 1. Различные методы вычисления определенных интегралов 3 1.1. Метод Симпсона для интегрирования функций F(x) по заданному промежутку и его реализация на языке Pascal 4
Приближенное вычисление определенных интегралов
Магнитогорский Государственный технический университет Приближенное вычисление определенных интегралов. Формула парабол (формула симпсона) Подготовил: Студент группы ФГК-98 Григоренко М.В.
Вычисление значения функции y(x)
Особенности применения компьютерных программ Pascal, Excel, MathCAD и Delphi для вычисления значения функции y(x) с заданным промежутком и шагом. Виды результатов вычислений, их сравнение и вывод. Изображение блок-схемы алгоритма решения задания.
Лабараторная работа №4
Цель работы: изучение правил записи констант, переменных, выражений, операторов присваивания, раздела определения констант, раздела описания переменных и общей структуры программы на языке Turbo-Pascal.
Создание графических объектов с помощью псевдографики
Основы работы на языке высокого уровня Turbo Pascal. Основное оборудование и программное обеспечение. Операторы, необходимы для работы в графической среде Turbo Pascal. Запуск графического режима. Текст программы в графической среде Turbo Pascal.
Работа с типами данных записи
Создание программы для обработки структуры данных. Возможность ввода и записи данных на персональном компьютере. Прикладное программирование на языке Turbo Pascal. Свободное редактирование записанных данных с помощью программы, написанной на Turbo Pascal.
Turbo Pascal
Рязанская государственная радиотехническая академия Кафедра Вычислительной и Прикладной математики Пояснительная записка К курсовой работе по дисциплине
Le Huitieme Jour Essay Research Paper Date
Le Huitieme Jour Essay, Research Paper Date: 1997 Genre de film: Drame Metteur en Sc?ne: Jaco Van Dormael Realisateur: Philippe Godeau Avec: Daniel Auteuil comme Harry
Scientific Revolution Essay Research Paper AP European
Scientific Revolution Essay, Research Paper AP European History Lin Malaitham Period IV Discuss the different beliefs, attitudes of Cervantes, Bunyan, Milton, Spinoza and Pascal. Discuss their skepticism/Dogmatic beliefs, their reasons behind it and your opinions.
Fab Essay Research Paper The history of
Fab Essay, Research Paper The history of the computer began 2000 years ago with the invention of the abacus. Though this invention only allowed for simple arithmetic calculations, it was still very effective. A great many years after this, another calculation device, the first digital calculator, was created by Blaise Pascal in order to help his father who was a tax collector .
Pascals Wager Essay Research Paper
“Who is God? Where is God? Does God really exist? Should I believe in God?” These are some of the questions which are asked by millions of people each and every day who are desperately trying to find some meaning in their life. Blaise Pascal tried to help society, as well as himself, to find the best solution to these problems.
The Will To Believe Essay Research Paper
The Will to Believe Human passions are stronger than technical rule. (James pg.129) Throughout the history of mankind, there has always been a great dispute over religious beliefs. As time has passed, and as society has developed, religious skepticism has broadened the disagreement between human intellectualism and human opinion.
Descartes Vs Pascal Essay Research Paper
?Descartes vs. Pascal? For centuries, human beings have been debating over the validity of the use of reason. This is a very, very difficult subject to discuss, as one is forced to study something which is at that moment being used in their study. Two classic thinkers who contrasted on their view of reason were Descartes and Pascal.
Descartes Pascal And The Rationalist Credo Essay
, Research Paper Descartes, Pascal, and the Rationalist CredoPascal asserts that we can know only by the heart, whereas Descartes would have us believe through his truths that we can know with certainty of Gods existence. The factors that go into their views on reason will be compared and accented within this essay.
Man And The Universe By Pascal Essay
, Research Paper Pascal builds his argument in ?Man and the Universe? out of a series of paradoxes, seemingly contradictory truths. In writing, ?Man and the
Pascals Triangle Essay Research Paper The arithmetic
Pascals Triangle Essay, Research Paper The arithmetic triangle was developed in 1653 by Blaise Pascal. He named this triangle after himself and today it is known as Pascal’s Triangle. It is an arrangement of certain whole numbers in a triangular pattern.
Untitled Essay Research Paper Blaise Pascal was
Untitled Essay, Research Paper Blaise Pascal was born at Clermont on June 19, 1623, and died in Paris on Aug. 19, 1662. His father, a local judge at Clermont, and himself of some scientific reputation, moved to Paris in 1631, for two main reasons, to prosecute his own scientific studies, and to carry on the education of his only son, who had already displayed exceptional ability.
Blaise Pascal Essay Research Paper Hey i
Blaise Pascal Essay, Research Paper Hey i better get member ship Blasie Pascal Blaise Pascal was a French religious thinker, mathematicican, and physicist who possessed one of the greatest minds of the 17th century. Pascal was born in Clermont-Ferrand in central France on June 19, 1623. Pascal had two sisters named Gilberte and Etienne, who reffered to him as a prodigy.
Blaise Pascal Essay Research Paper Blaise Pascal
Blaise Pascal Essay, Research Paper Blaise Pascal was born in Clermont France on June 19, 1623 to Etienne Pascal. His mother died when he was only 3. He was the third of four children and the only boy. He was described as a man of: small stature, poor health, loud spoken, somewhat overbearing, precious, stubbornly persevering, a perfectionist, highly pugnacious yet seeking to be humble and meek.
Абель, Нильс Хенрик
Абель, Нильс Хенрик (Abel, Niels Henrik) (1802–1829), норвежский математик.