⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a1_10.m

📁 Matlab numerical methods,examples of mathematical procedures
💻 M
字号:
echo on; clc;
%---------------------------------------------------------------------------
%A1_10   MATLAB script file for investigating Theorem 1.10
%
% NUMERICAL METHODS: MATLAB Programs, (c) John H. Mathews 1995
% To accompany the text:
% NUMERICAL METHODS for Mathematics, Science and Engineering, 2nd Ed, 1992
% Prentice Hall, Englewood Cliffs, New Jersey, 07632, U.S.A.
% Prentice Hall, Inc.; USA, Canada, Mexico ISBN 0-13-624990-6
% Prentice Hall, International Editions:   ISBN 0-13-625047-5
% This free software is compliments of the author.
% E-mail address:       in%"mathews@fullerton.edu"
%
% Theorem 1.10  (Second Fundamental Theorem).
% Section 1.1,   Review of Calculus, Page 8
%---------------------------------------------------------------------------

clc; clear all; format long;

% Theorem 1.10  (Second Fundamental Theorem).  If  f  is continuous
%
% over the interval [a,b], then
%
%         x
%     d   /
%     --  | f(t) dt  =  f(x).
%     dx  /
%         a         
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

pause % Press any key to continue.

clc;

% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%                                   4 3x
% Example for page 7.  Let  f(x) = x e  sin(2x).  
%
%                  x
%              d   /
% Show that    --  | f(t) dt  =  f(x).
%              dx  /
%                  0
f = 't^4*exp(3*t)*sin(2*t)'
g = int(f,'t',0,'x')
diff(g,'x')

clc;

%....................................
% Begin section to print the results.
%....................................
clc;disp(' ');disp(' ');disp('The function f(t) is:');...
disp(' ');disp(['f(t) = ' f]);...
disp(' ');disp('The integral is:');...
disp(' ');disp('x');...
disp(' ');disp('/');...
disp(' ');disp('| f(t)dt = g(x) = ');...
disp(' ');disp('/');...
disp(' ');disp('0');disp(g);...
disp(' ');disp('The derivative of g(x) is:');...
disp(' ');disp(['g`(x) = ' diff(g,'x')]);disp(' ');

pause % Press any key to continue.

clc;

% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%                                                 2
%                                               -x /2
% Example for page 7.  Let  f(x) = 1/sqrt(2*pi)e     .  
%
%              d   x
% Show that    --  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -