OVERVIEW Mathematica Basics

OVERVIEW Mathematica Basics

�������� The Mathematics Companion for Finite Mathematics and Business Calculus is a dictionary-like refer- ence guide for learning and applying mathematical ideas, techniques, and formulas with the help of Mathematica, the leading computational software for students and users of mathematics in business, economics, and the life and social sciences. The material in the book is organized alphabetically for easy use and reference. It can be used as a tutorial introduction to the basics of Mathematica and touches briefly on the value of Wolfram Alpha as an extension of the material covered in the companion. Many examples illustrate the use of Mathemat- ica “Manipulations” for dynamic learning and exploration. The following excepts from selected chapters indicate the style and range of topics covered in the book. ������������������ This chapter illustrates some of the basic features of Mathematica useful for finite mathematics and business calculus. ◼ Example �����������ⅇ The symbol ⅇ denotes the base of the exponential function. The N function can be used to produce decimal approximations. N[ⅇ, 45] 2.71828182845904523536028747135266249775724709 Special symbols can be entered and formatting options can be invoked using special menus called “palettes.” ◼ Opening Mathematica Palettes ��������� �������������������������� See also: Maxima and minima Suppose that a function has several maxima or minima on sub-intervals of its domain. Then these maxima are referred to as “local maxima.” The absolute maximum of the function over the entire domain is the maximum the local minima, if it exists. The absolute minimum of the function on a domain is the minimum of the set of “local” minima. If the domain of a function is an interval including endpoints, then the values of the function at the endpoints are included in the set of potential absolute maxima and minima. Mathematica Illustration ������� ◼ Solution 1 f[x_]:= Sin[x] MaxValue[f[x], x∈ Reals] 1 Solve[f[x]⩵ 1, x] π x→ ConditionalExpression +2πC[1],C[1]∈ Integers 2 Plot[f[x],{x,-20π, 20π}] 1.0 0.5 -60 -40 -20 20 40 60 -0.5 -1.0 The graph shows that the sine function assumes its absolute maxima and minima at infinitely many points over its domain. The graph shows that the sine function assumes its absolute maxima and minima at infinitely many points over its domain. We can vary the interval {x, -20 π, 20 π} at will to view the graph of f[x] for other real number inputs and to stretch or shrink the display of the functional values. ◼ Solution 2 Plot[f[x],{x,-π,π}] 1.0 0.5 -3 -2 -1 1 2 3 -0.5 -1.0 This graph shows that if we restrict the domain of f to the interval -π ≤ x ≤ π, then the function has a unique global maximum and a unique global minimum on the specified domain. ��������� ���������� See also: Discrete plots, histograms, list plots, list line plots, pie charts, trees Mathematica has an extensive repertoire of tools for visualizing data. Among them are the bar charts. Mathematica Illustration ������� BarChart[Range[10], ChartStyle→ "DarkRainbow"] 10 8 6 4 2 0 ������� BarChart[{Range[4], Reverse[Range[4]]}] ������� BarChart[{{1, 2, 3, 4},{1, 4, 3, 2, 5}}, ChartLabels→{"a", "b", "c", "d", "e"}] a b c d a b c d e ��������� ��������� See also: Annuities The financing of a car loan is an example of the repayment of an ordinary annuity. Mathematica Illustration ������� Suppose we are planning to buy a new car worth $35,000 and we have two choices of paying for the car: 1. 0% financing over 60 months. 2. 4.5% financing, compounded monthly, together with a rebate of $5,000. Which option should we choose? ◼ 0% financing 35 000.00 pmt= 60 583.333 ◼ 4.5% financing and a $5,000 rebate We use the amortization formula Clear[pv, i, n, pmt] i pmt[pv_, i_, n_]:= pv 1-1+i -n If we choose the rebate option, we are borrowing only $22,200 at a monthly rate of i = 0.045/12 per cent for 48 months. pmt30 000, 0.045 12, 60 559.291 The calculations show that the 4.5% option is the way to go. The payment formula corresponds to the present value formula of an ordinary annuity. We can verify this by computing the present value of the annuity consisting of 60 monthly equal payments: 1-1+i -n pv[pmt_, i_, n_]:= pmt i pv559.291, 0.045 12, 60 30 000. ������������������������������ See also: Derivatives of composite functions The chain rule tells us how to differentiate functions constructed by “composing” two or more given functions. Wolfram Alpha Illustration ���������� ����� ��������������� ����� ���� (������������ �������) ���������� ���������������(�)��������������������������������������������������(�)�������������������������������� �(�)� ����������������������◦����������������������� �� �������������������(�(�))����� ��(�)� �����ⅆ�/ⅆ�ⅆ�/ⅆ�·ⅆ�/ⅆ�� �������� ������ ������ ���������� ��������� �� �� �� · �� �� �� �������� ������������ ����� | ������ ����������� �������� | ����������� �������� Mathematica Illustration ������� f[x_]:=3x 2 - 2; g[y_]:= Log[y]; h[x_]:= Composition[f, g][x] h[x] -2+ 3 Log[x] 2 h[x]⩵f[y]/. y -> Log[x] True D[h[x], x] 6 Log[x] x The function h is usually written with the composition symbol “∘” as (f∘g) and its values are denoted by f(g(x)). ������� Composition is not commutative. The function (f∘g) is rarely equal to the function (g∘f). k[x_]:= Composition[g, f][x] k[x] Log-2+3x 2 D[k[x], x] 6 x -2+3x 2 It is easy to verify that the function h[x] and k[x] are not equal. If we evaluate both functions at x = 1, for example, we get different results: h[x]/. x→1 -2 k[x]/. x→1 0 ��������� ��������������� A discontinuity is a point at which a function is discontinuous. There are various reason why a in one variable is discontinuous at a point x in its domain. 1.A function may be discontinuous at x if its value f[x] is different from the limit of f[x] at x. In this case, the discontinuity is said to be removable. All we need to do is to redefine f[x] to be equal to the limit of f[x] at x. 2.A function may be discontinuous at x if the limit of f[x] at x does not exist. For example, the left limit may be different from the right limit. 3.A function may be discontinuous at x if either the left limit or the right limit of f[x] at x does not exist. Mathematica Illustration ������� ◼ A removable discontinuity (x-1)x+2 f[x_]:= (x-1) f[1] � ������ �������� ���������� ������������ � ��������� ������������� ���������� � ��������������� ������������ Indeterminate g[x_]:= Piecewise[{{f[x],!(x⩵1)},{1, x ==1}}] g[1] 1 ������� ◼ The value f[x] is different from the limit of f[x] at x. h[x_]:= Piecewise[{{-1, x<0},{.5, x≥0}}] Plot[h[x],{x,-2, 2}] 0.5 -2 -1 1 2 -0.5 -1.0 {h[0], Limit[h[x], x→ 0, Direction→1], Limit[h[x], x→ 0, Direction→-1]} {0.5,-5,-5} ��������� ���������������������������������� See also: Derivative of the logarithmic functions Suppose that the price p and the demand x of a product are related by a price-demand equation f[p_]:=x Then the elasticity of demand at price p is the relative rate of change of demand x, divided by the relative rate of change of price p: D[Log[f[p], p] p f'[p] elasticity[p] = ⩵ D[Log[p], p] f[p] Mathematica Illustration ������� Suppose that x = f(p) = 1000 (40 - p), for example, then f[p_]:= 100040-p then DLog100040-p, p elasticity[p] = - D[Log[p], p] p 40-p p /.{p→1} 40-p 1 39 p Manipulate ,{p, 0, 30} 40-p � 0.518027 (p+a) Manipulate ,{p, 0, 30},{a, 0, 10} 40-(p+a) � � 0.95122 If 0 < E(p) < 1, the demand is said to be inelastic, if 1 < E(p), the demand is said to be elastic, and if E(p) = 1, a percentage change in the price of the commodity entails the same percentage change in demand. In the given example, the Manipulation shows that the demand is inelastic if the unit price of the commodity is less than $20 and is elastic if the price of the commodity exceeds $20. Furthermore, p elasticity[20] = /. p→ 20 40-p 1 Hence the percentage change in price of the commodity leads to the same percentage change in demand. ����� � ◼ Absolute equality of income, 17 ◼ See: Gini index, Lorenz curve ◼ Absolute maxima and minima, 17 ◼ Absolute value, 18 ◼ Absorbing Markov chains, 20 ◼ Absorbing states of a Markov chain, 21 ◼ Addition of matrices, 23 ◼ See: Matrix algebra ◼ Addition principle for counting, 23 ◼ Amortization, 24 ◼ And (∧, &&), 26 ◼ See: Boolean logic (conjunction) ◼ Angle, 26 ◼ Annuities, 27 ◼ Anti-derivative, 30 ◼ See: Anti-differentiation ◼ Anti-differentiation, 30 ◼ Area, 36 ◼ Arithmetic mean, 40 ◼ Arithmetic sequence, 41 ◼ Arrow representation of vectors, 42 ◼ See: Vectors ◼ Asymptotes, 42 ◼ Augmented matrix, 44 ◼ Average, 45 ◼ See: Mean, median, mode ◼ Average rate of change 45 � ◼ Bar charts, 47 ◼ Bayes' formula, 49 ◼ Bernoulli trial, 49 ◼ Binomial coefficients, 50 ◼ Binomial distribution, 51 ◼ Binomial probability experiments, 53 ◼ See: Bernoulli trials ◼ Binomial probability distribution, 53 ◼ Binomial theorem, 54 ◼ Boolean logic, 55 ◼ Break-even point, 58 ◼ See: Business functions ◼ Business functions, 58 ◼ Cost functions, 58 ◼ Demand functions, 60 ◼ Profit functions, 61 ◼ Revenue functions, 62 ◼ Break-even point, 63 � ◼ Car loans, 65 ◼ Chain rule for differentiation, 66 ◼ Characteristic polynomial, 68 ◼ Codomain of a function, 70 ◼ Column vectors, 71 ◼ Combinations, 72 ◼ Common logarithms, 73 ◼ Complement of a set, 74 ◼ Complex numbers, 76 ◼ Composite function, 77 ◼ See: Functions, chain rule ◼ Compound event, 77 ◼ Compound interest, 77 ◼ Concavity of the graph of a function, 78 ◼ Conditional, 79 ◼ See: Boolean logic, if-then ◼ Conditional probability, 79 ◼ Conjunction, 81 ◼ See: And, Boolean logic ◼ Consistent linear systems, 81 ◼ Constant functions,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    22 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us