Question: Sometime later the course, we shall explore a few different ways of finding the roots of nonlinear equations. That's just a fancy way of saying:

 Sometime later the course, we shall explore a few different ways

Sometime later the course, we shall explore a few different ways of finding the roots of nonlinear equations. That's just a fancy way of saying: how to find the value of something (often just one variable, like temperature) such that everything we know about a system (requirements, constraints, data) falls into place. The "system" is usually represented by a complicated equation in which our key variable appears here and there, often implicitly ("transcendently) - such that the unknown cannot be brought to the LHS leaving all functions of the knowns on the RHS. (The latter operation is the case for linear equations, like the relation between temperatures in Celsius vs Fahrenheit; given a temperature in one unit, one can calculate what it would be in the other, readily.) Science/Engineering problems that call for solving a nonlinear equation in a single variable can be -in the abstract-expressed or rearranged as: Find the value of x that satisfies f(x)=0. Some of the methods require the 1 st and 2 nd derivatives of that f(x) w.r.t. x, denoted as f(x) and f(x) respectively, preferably analytical expressions (as opposed to finite-difference numerical derivatives). The purpose of the present exercise is to set the stage for the aboveoutlined exploration of root-finding methods. The task now is to find expressions (using Matlab Symbolics) for the 1st and second derivatives of a given (mathematical) function; e.g. sinx, to pick a trivial example. For the purpose at hand, we can't stop after Symbolics spits out the expressions for the derivatives. We need to go further and convert these expressions (three in total: the input mathematical function, and the 1st&2nd derivatives generated by Symbolics) into Matlab anonymous functions (i.e. function handles) or, preferably, function files. Write a Matlab code that gets a mathematical function from the user and generates three function handles or function files (func0, func1, and func2, respectively) for enumerating the input function and its first two derivatives

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!