You are on page 1of 10

ECON7007: Economics of the Environment

Introduction to Mathematica Fall term of 2013


Solutions become available:Friday Oktober 4th 2013
Christian Spielman & Frank Witte
Department of Economics University College London, Gowerstreet, WC1E 6 BL, London

1. The Basic Structure of Mathematica


Summary: The purpose of Section 1 is the following: Please read the text and activate the commands (it will be explained in the text what activating means) and try to understand the commands as well as the results of the commands! A Mathematica notebook is made of many different cells and each cell comes with its own character and utility. There are cells for text, or for (sub)section headings but also for input for commands and calculations and for output for the results of calculations and commands. So lets look at Cells first.

1.1 What is the typical structure of a Mathematica Notebook?


Summary: The purpose of subsection 1.1 is to explain the most basic aspects of Mathematicas set-up. Cells Let me first say what a Cell is: look at the righthandside of this window and youll see that the piece of text youre reading now, including the heading Cell has a right margin containing blue boxes. If you click on it one with you mouse-pointer it will light-up dark blue indicating it has been selected as is standard in most software. The thing you have selected is a Text Cell. Note that the heading of this subsection is in a separate cell as well and that the subsection, including the text cells in it form a cell in a second layer in the margin. The sub-subsection as a whole is also wrapped into a cell. If you explore the additional layers in the margin further you will see that the subsection is a cell and so is the section as well as the document as a whole. So a Mathematica workbook consists of nested cells. If you double-click one of the higher-level cells, for example the one including the entire section here, you'll see that it closes. If you doubleclick it again it reopens. Note that when you've closed the cell you can recognize in the margin that there is a closed cell under the heading that remains visible. The commands in the cell drop-down menu that you are likely to need at some point or another are "Divide Cell" and "Merge Cells". Let us do something with them right now. These two basic manipulations of cells are very convenient when, for example, you want to create an additional subsection somewhere. They can also be convenient when you want to print out the Notebook. Mathematica will always try to print whole cells as a whole, which sometimes leads to many blank pages in the print out because of the fact that Mathematica tries not to split up large cells. By splitting a few large cells into smaller ones the printing becomes more economical. Or sometimes you might want to put part of your text into a separate cell so that you can close it. It will then appear as a closed cell in print out but can still be accessed of course on screen by simply opening it. Under the "Cell" tab in the menu bar you will find lots of useful functions for the manipulation of cells, for example to change their character. The typical structure of a Notebook The typical structure of a notebook will be a mixture of text cells (including cells related to other formatting elements such as headings) and input and output cells which contain your calculations and the results of your calculations. Input cells need to be evaluated in order to produce the corresponding output cell. Before we look at the process of Evaluation let me first say something about the format of a typical Notebook. This notebook has the "JournalArticle" style. You can find this style under the format tab in the menu, go to StyleSheet and then to Article and youll see the JournalArticle style ticked. Evidently you can change the style to another Stylesheet if you like. If you work in, for example, an Article style or a Book style and you just start typing somewhere then Mathematica will assume you are going to write text and open a text-cell. However if you work in the Default stylesheet and just start typing somewhere, then Mathematica will assume you are going to do calculations and thus open up a Input-cell.

ThisMathematicaPrimer2013.nb notebook has the "JournalArticle" 2

style. You can find this style under the format tab in the menu, go to StyleSheet and then to Article and youll see the JournalArticle style ticked. Evidently you can change the style to another Stylesheet if you like. If you work in, for example, an Article style or a Book style and you just start typing somewhere then Mathematica will assume you are going to write text and open a text-cell. However if you work in the Default stylesheet and just start typing somewhere, then Mathematica will assume you are going to do calculations and thus open up a Input-cell.

1.1.1 Diagrams drawn by Hand

Summary: The purpose of subsubsection 1.1.1 is to quickly elucidate how you can draw diagrams in Mathematica by hand. This will be useful in the submission of any coursework involving diagrams or sketches of graphs. You may want to draw some diagrams in your text by hand. Mathematica will support you in doing that. First you create a figure cell and then you go to the menu Graphics and open up DrawingTools. Subsequently you put the cursor in the Figure cell and click on the New button.

Demand

Supply

MathematicaPrimer2013.nb

Demand

Supply

Quantity

Price

The way of drawing diagrams this was is probably cleaner and easier than with pencil, paper and rules. Evidently on the exams you will have to use pens, pencils and paper. However, if you get it right using the drawing tools in Mathematica, it would be very surprising if you would get it terribly wrong with pencil and paper. Drawing diagrams by hand is especially useful when either you have no idea about the functional forms youre looking for (which would be a tad worrisome I have to admit) or when you want to draw figures unrelated to plotting functions, such as organizational diagrams, concept-clouds or flow-diagrams.

1.2 Where can I find Help?


Summary: The purpose of subection 1.2 is to remind you of the usefulness of palettes and of the Help menu. Mathematica can help you in many ways and to smoothen especially the writing of equations or commands there are several input palettes to help you. But Mathematica can also drive you crazy at times, at which you then evidently need a different kind of Help. Palettes Palettes are small button pads that open up and give you direct access to all kinds of characters or functions or commands at the click of a mouse button. Probably when you opened this Notebook Mathematica already opened up one palette called "Basic Math Assistant" on your far right. It contains all kinds of typesetting and calculational commands and will contain pretty much what you might need during an average Mathematica session. Other palettes contains slightly different or more specialized selections of buttons to press. You will usually only use the Basic Math Assistant. Take a few minutes to go through all the typesetting commands available; note that there are menu bars directly beneath the words "Basic Commands" and "Typesetting". Help At the far right of the menu you will see "Help". If you click that button with your mouse pointer a drop-down menu opens and the first option there is the most important one: the document center! Click it and you will see a new window opens giving you access to all documentation on Mathematica functionality. Whenever you are looking for something, even when all you know are some not so specific keywords: go here and try a search. Probably you'll find what you need.

1.3 What is the typical structure of a Mathematica command and how do I execute it?
Summary: The purpose of subsection 1.3 is to explain how to evaluate/execute or activate commands in Mathematica. Mathematica commands are written into input cells and input cells automatically generate output cells as soon as you Evaluate them. An input cell can be something as simply as a direct arithmetic instruction, such as for example 2 2

MathematicaPrimer2013.nb

In order for anything to happen we need to evaluate it. Evaluation The process of "Evaluation" in Mathematica means calculating something. A separate part of the Mathematica programme called the "Kernel" is responsible for executing the calculations you do. As soon as you ask Mathematica to do a first calculation then "Kernel" will start up. The first time it does this it might take anywhere between 5 and 30 seconds. All commands after that will be processed quicker. The quick way to evaluate an input cell is to put the cursor in it and hit SHIFT-Enter, if we do that to the input cell above we get 2 2

Alternatively we could also have selected the cell using the mouse-pointer and the left mouse-button and then choose evaluate cells from the Evaluation tab in the menu. Thats cumbersome and I never do use it. But you might if you have set-up your notebook as demonstration and you only wish to execute a selected few commands (input cells) from your notebook in a presentation. If you select several cells (with your left mouse-button while keeping Ctrl pressed for example) and then evaluate them, Mathematica will evaluate them in the order in which they appear in the notebook from title to end. If an evaluation takes very long, then usually you have either sent Mathematica into the jungle with a set of commands that are almost impossible to execute properly, or it has gone into a loop from which it finds it hard to break away. In such cases it can be expedient to use the Abort Evaluation from the Evaluation tab menu in order to stop the running evaluation and check your commands whether youre over-asking Mathematica. Interrupt Evaluation is useful when Mathematicas calculations are drawing heavily on your CPU and you need to pick up that Skype call or watch that YouTube video before allowing Mathematica to complete its job. One particularly relevant command in the "Evaluation" drop-down menu is "Quit the Kernel" which shuts off any calculations and throws away all the intermediate results of calculation up until that moment. It is sometimes the only way to get Mathematica to stop doing something you don't want it to do if an "Abort Evaluation" or "Interrupt Evaluation" fail. These two you can also find in the drop-down menu but they are only visibly as black letters when there is actually an evaluation running.

1.4 How can I do basic numerical and symbolic calculations with Mathematica?
Summary: The purpose of subsection 1.4 is to familiarize you with the basic computational functionalities in Mathematica. Now lets do some calculations! I will try to set up some context that has some relevance to Economics. For this first section I will look at long-run and short-run cost curves.

1.4.1 Simple definitions and manipulations


Summary: Subsubsection 1.4.1. introduces the basic manipulations of expressions you can do with Mathematica. As a running example we look at the minimization of a cost-function. This setting will be familiar to you from the first-year ECON1004 module. Basic aims are getting a numerical values, replacing symbols with numbers (or with other symbols) and simplifications which are typically the most common operations you will apply to expressions. Now lets do some calculations! I will try to set up some context that has some relevance to Economics. For this first section I will look at long-run and short-run cost curves. So suppose we are looking at a production process of some good where the cost associated with producing a quantity Q using a stock of productive capital K is given by Cost 500 Q1 3 K 1 2 1 Q 2 Now I wrote this in an NumberedEquation cell, but Mathematica treats that basically just like text. To make Mathematica memorize what I mean by Cost I have to give a command. That would look like this: Cost K 500 2 Evaluating this command makes Mathematica memorize the definition of Cost. We could ask Mathematica to calculate this cost when we provide actual number, suppose we have Q 10 000 and K 1000 then we can use the so-called replacement-rule to find the cost via the command Cost .Q 10 000 . K 1000 500 Q1 K Q1
3

K .

(1)

K1

1 Q 2 K

You can turn the command into standard English as follows: it says take Cost replace Q by 10000 and then replace K by 1000. The symbol /. is the replace command and the Q 10 000 is the rule. Together such combinations are called replacement rules and they are very useful in manipulating expressions.

MathematicaPrimer2013.nb

Evidently you can also replace a variable with another expression. Suppose you would like to assume that the capital K required for the production of a quantity Q is actually linearly related to the quantity you want to produce, i.e. suppose we would have a relationship like K K0 aQ

where K0 represents some fixed capital you need in order to be able to produce anything and the coefficient a represents the increase in required capital if we increase the quantity we want to produce. We can substitute this into our Cost as follows Cost . K K0 aQ

Note that you need to write a space between the Q and the a otherwise Mathematica will think aQ is a name of something rather than a product of two things. When we evaluated the cost with two numbers substituted you will have seen that the result in the output cell appears symbolic in a weird way. Why doesnt Mathematica provide you with a decimal number answer? Well, it can but you have to tell it to! As long as you dont tell it Mathematica will even treat ordinary numbers are symbols in some ways. By explicitly requesting Mathematica to turn it into a numerical value you will get an ordinary number. There are two ways of doing this N Cost . Q 10 000 . K 1000 Cost . Q 10 000 . K 1000 N In the first line I used the official command N ... " that turns the expression in the brackets [] into a numerical expression as much as possible. In the second line I appended our earlier expression by N which is Mathematica speak for after youve done all the stuff before the // then please apply the command written after the //. Another very common command you will use in these two fashions in the Simplify command. When I apply Simplify to the cost expression with the two numbers inserted it gives me Simplify Cost . Q 10 000 . K 1000 Cost . Q 10 000 . K 1000 Simplify It has explicitly factorized a factor 100. Whether you consider that simpler is largely a matter of taste I would say. As a result Simplify gives you expressions which Mathematica considers simpler than the one you started out with. In my experience the result of Simplify is indeed often simpler than what you started out from, but on many occasions it is not. In addition to Simplify there is also a FullSimplify command. The difference between these two is the amount of time and the amount of tricks Mathematica is going to invest in simplifying an expression. The main drawback of FullSimplify is that sometimes Mathematica will use excessive amounts of time merely to produce an expression that is just a little bit simpler than what a Simplify would have produced ... a diminishing marginal product of CPU time ... I dont need to explain that I guess! If we again wish to substitute our relationship between quantity Q and required capital K we can Cost . K K0 aQ . Q 10 000 . K0 1000 Simplify N

giving us a function of the parameter a only. Boiling down symbolic expressions with lots of substitutions simplifications and numerical values inserted can be quite cumbersome and yet great care must be taken! Note: When you use several replacement rules and commands the order in which you apply them may affect the final result! So always take care that you check whether the order is the one you want! Mathematica will not think for you.

1.4.2 Simple Plots;


Summary: Subsubsection 1.4.2. introduces the basic plotting functionalities of Mathematica. Building on the previous example I give ommands for a few simple plots with an increasing level of detail in the plot, such as titles, axes-labels, etc. Now you may want to see what this function of the parameter a looks like. A very basic plot can be made by using the simply plot command Plot[...]. So suppose we estimate that a is somewhere between 0 and 0.25, then we can plot Plot Cost . K K0 aQ . Q 10 000 . K0 1000 Simplify N, a, 0, 0.25

Its okay, but not very pretty. Lets put this plot in a frame Plot Cost . K K0 , Frame True aQ . Q 10 000 . K0 1000 Simplify N, a, 0, 0.25

Adding a frame is a so-called Plot Option and Mathematica offers you loads of them. Now a name would be nice as well Plot Cost . K K0 a Q . Q , Frame True, PlotLabel 10 000 . K0 1000 Simplify "Cost for Q 1000 and K0 1000" N, a, 0, 0.25

MathematicaPrimer2013.nb

And how about saying what is on the axes? Plot Cost . K K0 a Q . Q , Frame True, PlotLabel FrameLabel "a", "Cost" 10 000 . K0 1000 Simplify N, a, 0, 0.25 "Cost for Q 1000 and K0 1000",

I would say that if you want to use Mathematica to produce plots for coursework that you need to submit then such a plot with a name and legible axes-labels is the minimum standard.

1.4.3 Differentiation & simple equation solving;


Summary: Building on the previous example differentiation and analytical equation solving in Mathematica is introduced. A firm that wants to commercially produce a quantity Q will seek to minimize the cost. In order to establish at which stock K of productive capital the cost reaches a minimum we need to be able to differentiate. You can use various guises of this command, The easiest is to simply take it as from the palette. So if we want to differentiate the cost with respect to capital we do

K Cost

Minimizing the cost means setting the derivative of the cost with respect to K equal to 0, and checking the sign of the second derivative with respect to K . Let's first look at the first step. Here we can use the Mathematica command Solve to come up with a solution Solve
K Cost

0, K

Before evaluating it, please carefully read this command into standard English. It says Solve the equation K Cost 0 for the variable K . The fact that we use a double is equal sign, == with no space in between, is to let Mathematica understand the difference between assigning the two sides to be equal and requiring the two sides to be equal. Earlier in our definition of Cost we assigned the symbol Cost to be equal to the expression we used. Now however we are requiring the derivative to be 0, we are not assigning the value 0 to it. Note: The difference between assigning and requiring may sound like pedantic nitpicking to you, but it is actually crucial. What this shows is that Mathematica forces you to be really precise about what you want it to do and how you want it to do it. Mathematica will not think for you. If you think rubbish ... Mathematica will produce rubbish. You will not believe how many students find Mathematics hard because they are not careful with such distinctions as the one here between assigning a value and requiring a value. Mathematica will require you to be precise, for me that is a life-saving property of Mathematics despite that it can terribly annoy me when the programme exposes my sloppy thoughts. The process of solving the equation is hopefully going to produce a solution that I can use. To make it easy for me to call it back I will just give it a name. SolK Solve
K Cost

0, K

Note that it writes down the solution as a replacement rule within curly brackets. The curly brackets indicate that the Solve commands expects that equations could have multiple solutions and in that case it would use toe curly brackets to write lists of solutions rather than pick one. We will come to handling lists later on. Here we only have one solution fortunately. If we wish to use the solution in an expression we must use it like a replacement rule. Note that when we use it directly to replace K with the solution of requiring the derivative to vanish K . SolK Mathematica retains one set of curly brackets. However when you ask Mathematica not to use SolK but the rule within the first set of curly brackets which is SolK[[1]] K . SolK 1

we do get what we expected. Of course more interesting is substituting this solution back into the cost function Cost . SolK 1

If we want to check whether this is actually a minimum we should evaluate the second derivative at the solution we found, i.e.
K K Cost

. SolK

The second derivative is always positive for non-vanishing quantities, i.e. we are indeed dealing with a minimum!

MathematicaPrimer2013.nb

Getting a little insight and intuition


Now let us look at the difference between this cost-curve and the cost-curve for some fixed amount of capital K . We would expect that the cost-curve in which we have inserted the minimum always out-performs the cost curve with a fixed capital stock except where Q just happens to "hit" the right value for the cost to be at the minimum. A nice way of visualizing this is by plotting this difference for a number of different choices of K 500, 1000 and 1500. The result is Plot Cost . SolK 1 Cost . K 500 , Cost . SolK 1 Cost . SolK 1 Cost . K 1500 , Q, 500, 100 000 , Frame True, PlotLabel "Minimum Cost as a function of Q ", FrameLabel "Q ", "Cost" Evidently this must have something to do with the Envelope theorem, right? Note: Making plots can be extremely useful in getting some intuition for a model or a problem. But it is also very dangerous. In a plot you never see what happens outside of the frame and as a result a plot can be very misleading regarding the overall properties of a function. So always make several plots, for different ranges of the plot-variables or values of parameters. Play with plots and never draw conclusions on the basis of a single graph. Cost . K 1000 ,

1.4.4 Numerical Equation solving


Summary: Subsubsection 1.4.4. introduces the basic numerical equation solving using NSolve and FindRoot commands. Now sometimes you want to solve an equation but neither you or Mathematica can find an analytical solution. In this case you may want to use either the Nsolve command or the FindRoot command. Suppose you would like to know for which combination K 100 and Q the cost reaches the value 5000, then you would ask Mathematica
In[1]:= Out[1]=

NSolve

Cost . K

100

5000, Q

In fact we could define a function in Mathematica which gives us this solution for Q whenever we specify both K and the Cost. In Mathematica this command would read QSol Cst_, k_ : Q . NSolve Cost . K k Cst, Q 1

Before you activate the command note: the variables in the function QSol are specified by a symbol followed by an underscore. This tells Mathematica that these symbols are arbitrary or wildcards and that we want Mathematica to try and compute QSol no matter what we put in the place of these arguments! Secondly the function is defined using a := sign which tells Mathematica to evaluate the value of the function only when we explicity call for it and not immediately after activating the command. If you now activate it, then the command below will compute the same solution as above QSol 5000, 100 This set-up is useful when you want to make plots of solutions! As we will do on Friday! The "FindRoot" command is similar to the "NSolve". The main difference is that in the FindRoot command we specify the equation we want to solve, the variable for which we want to solve it and we specify a value which is probably close to the real solution. In the case of our previous example FindRoot Cost . K 100 5000, Q, 4615

The "FindRoot" command is particularly useful when NSolve cannot find a solution because the equations are to complicated but you nevertheless have an idea where the solution should be. Also when an equation has many solutions, then FindRoot can be used to focus on those solutions you are mst interested in by asking Mathematica to look for the solution in the right neighborhood.

2. The Solow-Swan Model


Using Mathematica as an extended pocket calculator is fine, or as a text-editor that is easy on equations ... also fine. But it is also grossly underestimating what this type of software support can do for you, your learning and your dissertation. In this second bit of our Mathematica session I want to focus on a few things which are going to help you to use Mathematica as a learning tool. When I use it, for teaching or for research, I work, write and play with Mathematica. Summary:Section 2 focusses on using Mathematica as a tool to write, work and explore models in Economics. As a running example we will look at the Solow-Swan model from Macroeconomics. There will be Questions in the notebook that we recommend you to try and answer, writing your reply in a text cell and, if apropriate use Mathematica commands to show how you find your answer.

MathematicaPrimer2013.nb

2.1 Defining and plotting functions in Mathematica?


Summary: Subsection 2.1 focusses on equation solving and using plots to get insight into whether there are solutions and what they mean. We consider an economy in which at a time t there is a stock of productive capital K t and a supply of labour L t . The model now proceeds to assume that the productivity in this economy is described by some kind of production function F K , L of capital and labour. The stock of productive capital grows by means of investment and the model assume that the rate of investment s is exogenously fixed. However due to wear and tear the stock of productive capital also diminishes by a constant exogenous rate , the so-called depreciation rate. The Solow-Swan model now connects the rate, t K t , at which the stock of capital increases to the two processes of investment and depreciation by the equation
tK

sF K t , L t

K t .

(2)

The economy is said to be in an equilibrium if we have


tK

sF K t , L t

K t

0 .

(3)

Let us now use Mathematica to examine this equilibrium of the economy.

2.1.1 Equilibrium Economies


I now want to define a proper production function and in that definition I want Mathematica to remember what the arguments of the function are and what the parameters. In the example at hand the parameters would be the variables s and whereas the arguments of the production function are K and L. In Mathematica we can write for a Cobb-Douglas production function F K, L with constant-returns-to-scale the Mathematica command
In[2]:=

A K a L1

(4)

F K_, L_ :

A Ka L1

The underscores in the definition tell Mathematica that these K and L are arguments of the function. Mathematica will memorize this function for arbitrary first and second inputs. The arguments have a different colour than the parameters! The symbol : basically means the same thing as the standard assigning-is-equal . The added : merely indicated that the evaluation of the command is delayed. Mathematica will not calculate F K , L unless we explicitly ask for it, and then it will evaluate it anew every time it is called for. We can now use the solve command to find the equilibrium economy SolSS Solve s F K, L K 0, K

Substituting this into the productivity then gives us the equilibrium output F K, L . SolSS 1

which we can only simplify further by hand into


a 1

s
a

1 a

L A1

Question 1: Plot the equilibrium output per capita as a function of the ratio of investment and depeciation rate for a few choices of exponent a. When powers are concerned Mathematica is often more careful than it needs to be! Note: If you become precise in distinguishing between arguments of a function and the parameters describing the type and shape of a function, you will find out that it also becomes easier to understand which parts of a problem are Economics and which parts are actually Mathematics. The standard pictures of the Equilibrium Economies You may have seen this use of the Solow-Swan model before as well as a graphical representation of the equilibrium as the intersection of two graphs, the graph of f K and the graph of gK K . s F K, L ,

MathematicaPrimer2013.nb

Evidently we can plot that to using the simple plot-commands used earlier.
In[3]:=

Plot s F K, L . L 100 000 . a 0.25 . A 1 . s 0.05, K . 0.02 , K, 0, 600 000 , Frame True, PlotLabel "Solow Swan", FrameLabel "K ", "Value" Solow Swan
12 000

10 000

8000 Value

Out[3]=

6000

4000

2000

0 0 100 000 200 000 300 000 K 400 000 500 000 600 000

It is also easy to reproduce the typical depreciation shock picture Plot s F K, L . L 100 000 . a 0.25 . A 1 . s 0.05, K . K . 0.025 , K, 0, 600 000 , Frame True, PlotLabel "Solow Swan: Depreciation shock", FrameLabel "K ", "Value" 0.02,

Question 2: How do you intepret this plot? What does it say about an economy that experiences a shock increasing the depreciation? or the typical technology-shock picture
In[4]:=

Plot s F K, L . L 100 000 . a 0.25 . A 1 . s 0.05, s F K, L . L 100 000 . a 0.25 . A 1.1 . s 0.05, K . K, 0, 600 000 , Frame True, PlotLabel "Solow Swan: Technology shock", FrameLabel "K ", "Value" Solow Swan: Technology shock
12 000

0.02 ,

10 000

8000 Value

Out[4]=

6000

4000

2000

0 0 100 000 200 000 300 000 K 400 000 500 000 600 000

Question 3: How do you intepret this plot? What does it say about an economy that experiences a shock increasing the technology? But maybe you have always wondered what would happen if there was a shock in the exponents a, an elasticity shock?

10

MathematicaPrimer2013.nb

In[5]:=

Plot s F K, L . L 100 000 . a 0.25 . A 1 . s 0.05, s F K, L . L 100 000 . a 0.45 . A 1 . s 0.05, K . , Frame True, PlotLabel "Solow Swan: Elasticity shock ? FrameLabel "K ", "Value" Solow Swan: Elasticity shock ? at low 0.02
12 000

0.02 , K, 0, 600 000 at low 0.02",

10 000

8000 Value

Out[5]=

6000

4000

2000

0 0 100 000 200 000 300 000 K 400 000 500 000 600 000

Question 4: How do you intepret this plot? What does it say about an economy that experiences a shock increasing the output elasticity of capital? Can you think of an example of such a shock? As you might be able to see from this graph: depending on the value of the depreciation the response of the economy to the shock is very different. At a very high depreciation rate of 10% for example we would find
In[6]:=

Plot s F K, L . L 100 000 . a 0.25 . A 1 . s 0.05, s F K, L . L 100 000 . a 0.45 . A 1 . s 0.05, K . , Frame True, PlotLabel "Solow Swan: Elasticity shock ? FrameLabel "K ", "Value" Solow Swan: Elasticity shock ? at high 0.1
10 000

0.1 , K, 0, 100 000 at high 0.1",

8000

6000
Out[6]=

Value 4000 2000

0 0 20 000 40 000 K 60 000 80 000 100 000

Note: Never forget that you can only make graphs and plots of functions that actually produce numbers! If you are trying to plot something and it doesnt work ... there is a 99% chance that you forgot to assign a value to some of the parameters in your functions. Question 5: First save this file normally! Then remove all the commands (but leave the results) and change all the output cells containing graphs or figures into figure cells. Finally choose save as and choose to save the file as pdf. Then upload the pdf into turnitin and dont worry about the similarity between your submission and others.

You might also like