Try our Free Online Math Solver!

Thank you for visiting our site! You landed on this page because you entered a search term similar to this: solve nonlinear equation system maple symbolic, here's the result:
MCS 471  Computer Problem 2  Fall 2004
Zeros of Nonlinear Equations:
Computational Comparisons
Programs with Computer Outputs are Due Monday 18 October 2004 in Class.
 General Description:This computer problem involves finding zeros of nonlinear equationsusing the TWO of the solution systems:
 MATLAB^{*} interactive numerical computational (matrix) system;
AND  Maple interactive symbolic/numeric computational system;
Test your code using three test function examples given below, but your programs should be fairly general and NOT tailored to these examples.
^{*}A programming language system (like C or Fortran or their variants) may be substituted for the MATLAB system ifpreferred.
 MATLAB^{*} interactive numerical computational (matrix) system;
 Output Requirements: For the TWO Above Systems, submit
 If MATLAB system, a MATLAB MFile program, and Command Windowoutput for the three test examples, welldocumented
(if substitute C/Fortran system, a single program with six procedures,two each for the three sets of test functions and derivatives, withoutput welldocumented source code and output);  If Maple system, a Maple worksheet of code for the three test examples and output, welldocumented;
 If MATLAB system, a MATLAB MFile program, and Command Windowoutput for the three test examples, welldocumented
 Documentation:Document your own code with a brief description of the problem,an important variables dictionary and headings for important programmingsteps (use programming language comment lines).
 Newton Method Comparison:Implement the Newton's algorithm given in class with the stopping criteriagiven later.However, if iterations run out of the current COSI interval [a,b],then do three (3) bisection iterations to reduce the current COSI interval in size, then continue with Newton's method with the reduced COSI. Count all function evaluations used:
 If MATLAB programming, set "format long", implement Newton's methodand compare the answer to MATLAB's "[x_zero,f_zero] := fzero(f,x0);" if"f" is an inline defined function else use the function handle version "@f" if a mfile defined function "f" or else use the expression for thefunction enclosed in single quotes in place of the "f" argument of "fzero",where "x0" is the xvalue argument of the "min(f(a),f(b))",while plotting each of the three functions on the initial interval "[a,b]".
(If C/F programming substitute, use double precision (64 bits = 8 bytes, double in C or real*8 in Fortran) for Newton's and the comparison method. You may use C (CC or C++), Fortran (F77 or F90+) for this problem (else, see Prof. Hanson). Compare your Newton results to the Method of Bisection algorithm (also presented in class) using the number of iterations and the difference infinal zero position answers and the approximate value of the functionat that point.)  If Maple programming, set "Digits = 16;", implement Newton's methodand compare the answer to Maple's "x_zero := fsolve(f(x)=0,x=a..b);" andthe value "f_zero := f(x_zero);", while plotting each of the three functionson the initial interval "[a,b]".
 If MATLAB programming, set "format long", implement Newton's methodand compare the answer to MATLAB's "[x_zero,f_zero] := fzero(f,x0);" if"f" is an inline defined function else use the function handle version "@f" if a mfile defined function "f" or else use the expression for thefunction enclosed in single quotes in place of the "f" argument of "fzero",where "x0" is the xvalue argument of the "min(f(a),f(b))",while plotting each of the three functions on the initial interval "[a,b]".
 Newton Method Hybrid AbsoluteRelative Stopping Criterion:
abs(xnewxold) + abs(fnew) < tolabs + tolrel*(abs(xold)+abs(fold)) with absolute tolerance tolabs = 0.5e  7 for all subroutines and tolrel = 10*deps where deps is the double precision machine epsilon (found forComputer Problem#1) for the relative tolerance scale.Iteration limit is kmax = 80 (i.e., abort current function case with message if k > kmax) and the Tolerance Lower Limit for Derivative, f'(x) > told, Divide Check is told = 0.5E  10.
 Three Good Test Examples:
 f1(x) = exp(7.627*x)  x*exp(4.759); on [0.2, 1.2];
 f2(x) = exp(4.947)  x*exp(4.854) + exp(2.252*x); on [0.0,2.0];
 f3(x) = 80.18*exp(75.88*(x0.5714)^2)  77.09*exp(75.97*(x0.4903)^2);on [0.1,1.1].
 Additional and Special Output Requirements:
 Name of Your Computer System, Processor, MATLAB version (or substitute Compiler, and Compile Command Line) and Maple version;
 For each test example and Newton's method print a nicely labeled table of
kfeval, xold, xnew, abs(xnewxold), f(xnew), f'(xold), for all iterates displaying 5 significant digits. The item (f'(xold))is only used for the Newton's method.Give the starting value for both xnew andf(xnew) for the appropriate comparison method. Here, kfeval is total number of functionevaluations for current test function. The abs(xnewxold)and f(xnew) items of the table should be printed inenotation, because errors should almost always be in enotation.
 Helpful Information:
 Help on MATLAB:
 Prof. Hanson's Help for MATLAB,
 Help on Maple Worksheets:
 Beginner's Introduction to MapleV Release 5, or for more information see
 Prof. Hanson's Help for Maple Symbolic Tools Archive
 Substitute C Caution: Do NOT forget to include math.h headers, andadd the compiler option lm to the gcc (or any othercc variant) option list if needed (i.e., to remove errors because the compiler can not find some math functions). Also, C needs the powmath function, since it lacks an exponentiation symbol like "^".
 Substitute Fortran Caution: Do NOT forget that EXTERNAL statements are needed in Fortran, in all subprograms in which other subprograms are called with FUNCTIONarguments; the syntax is like EXTERNAL f1, f2, ..., fN and must comebefore any executable statements. Also, Fortran uses "**" for exponentiation instead of "^".
 Help on MATLAB:
Email Comments or Questions (MCS 471 only, please) tohanson A T uic edu