You are on page 1of 4

Mathematics for Economists 3610-E

Computer Homework Assignment #1

HUYNH NGOC PHUONG DUYEN

1. Consider the following profit function


p(Q) = (a )Q (b + )Q2 ,

(1)

where Q = output level and a, , b, are positive constants.


(a) this function in Mathematica. Then, for a = 1.5, = 6.5, b = 0.1,
= 0.5, plot it (as a function of the output Q) together with its
first derivative, in one figure, on the interval from 20 to 5. Add the
legend. Insert your code and graph as an image in Figure 1
p[Q_, a_, alpha_, b_, beta_] := (a - alpha)*Q - (b + beta)*Q^2
Plot[Evaluate[{p[Q, 1.5, 6.5, 0.1, 0.5],
D[p[Q, 1.5, 6.5, 0.1, 0.5], {Q, 1}]}], {Q, -20, 5},
PlotLegends -> "Expressions"]
(b) Based on the graph, answer the following five questions: 1) For what
value of Q (approximately) does p(Q) achieve its maximum? Lets
call this point Q0 . 2) Is the value of the derivative, p0 (Q), at Q0
zero? 3) Is the sign of the derivative to the left of Q0 positive or
negative? 4) Is the sign of the derivative to the right of Q0 positive
or negative? 5) In your own words, can you explain phenomena
described in questions/answers 2-4?
Answer(s): It would achieve its maximum value when the first
derivative of p (Q) = 0, that means when Q equals 4.166666667 The
value of p (Q) at this point equals 0 The sign to the right is negative
and the sign to the left is positive. This happen because a equation
would reach it maximum value when it has an U shape or a bell
shape. And these shapes has a tangent line which is a straight line
parallel with the x - axis - meaning the slope equals = 0. That s
why we also equal the first derivative of a function to 0 when we
want to find the maximum or minimum value. The sign of function
Due date: 3pm, Fri, 18/09/2015. Please, upload this .tex and the corresponding .pdf to
Moodle.

Figure 1: Plot of p(Q) and p0 (Q), where p(Q) is a profit function given by
equation (1).
change when we move from left to right is because of the nature of
the U shape or bell shape as we can see in figure 1
2. An exponential function with base a, a > 0, is defined as
f (x) = ax .

(2)

(a) Declare this function in Mathematica. Then, plot it (as a function of


x) for several values of a, a {0.5, 2, 2.7182, 4} in one figure, on the
interval from 2 to 2. Add the legend. Insert your code and graph
as an image in Figure 2
f[x_, a_] := a^x
f1 := f[x, 0.5]
f2 := f[x, 2]
f3 := f[x, 2.7182]
f4 := f[x, 4]
Plot[{f1, f2, f3, f4}, {x, -2, 2}, PlotLegends -> "Expressions"]
(b) Plot the derivative of f (x) for several values of a, a {0.5, 2, 2.7182, 4}
in one figure, on the interval from 2 to 2. Add the legend. Insert
your code and graph as an image in Figure 3
Plot[Evaluate[
D[{f[x, 0.5], f[x, 2], f[x, 2.7182], f[x, 4]}, {x, 1}], {x, -2, 2},
2

Figure 2: Plot of the exponential function from equation (2) for several values
of a.
PlotLegends -> "Expressions"]]

Figure 3: Plot of the derivative of the exponential function from equation (2)
for several values of a.
(c) Based on the graphs from exercises 2a-2b, for which base a does
the derivative f 0 (x) looks exactly like f (x)? Can you say something
about this number?

Answer(s): the second graph has the derivative graph nearly the
same with the orginial one. It is because its base is nearly e and
lne=1
(d) The exponential function with base a has the following property
f (x)

z}|{
f (x) = ax f 0 (0).
0

For the base a you selected in exercise 2c, what is the value of f 0 (0)?
Answer(s):

nearly equal 1

You might also like