Tuesday, August 31, 2010

Using Maxima to Work With Advanced Trigonometry

Share/Save/Bookmark
In a previous post, I whined about how difficult it was to program in Maxima. For those of you who don’t know what Maxima is – Maxima is a computer application for doing mathematics. What can you do with Maxima? Things like: factoring quadratic polynomials, solving equations, plotting graphs etc. (In t! echnical terms, Maxima is a Computer Algebra System (CAS).)

I recently stumbled upon several useful tutorials (see here, here, and here – make sure to visit the first link if you would like to get started with Maxima), showing you, among various things, how to program in Maxima. Reading those articles sent me in a furious race to write short helper functions.

In this post, I share those helper functions. I wrote them to help me check problems in one of our textbooks. They are are not “elegant” or efficient, but they do get the job done.

Now, I know that some teachers resist using technology in the classroom (! specially something so powerful as a Computer Algebra System),! so a fe w disclaimers first:

  • When you use computers to help you write questions, don’t forget that hard calculations are made easy. While it may take you 5 seconds to solve a problem on the computer, it may take a student half an hour to work out all the calculations by hand! So don’t forget to actually work out your questions the old fashioned way – pencil and paper.
  • If you have access to technology, chances are that your students do too. Every day, obscure and hard-to-use computer applications become easier to use and more mainstream. What this means is that whether you want to or not, you have to write questions that are “technology resistant.” Be creative and resourceful so that your students are forced to think and not just blindly calculate away.
  • When used properly, computers can free you to focus on the ideas and concepts. Calculation-intensive material all of a sudden becomes accessible. (For exampl! e, linear regression.) Make sure to emphasize and explain the limits of technology.

Installation

  1. If you haven’t already done so, download and install Maxima.
  2. Download trig.wxm. Don’t worry, it’s just a text file – text files are virus and malware free.
  3. Load trig.wxm. When load the file, Maxima will give you a harmless error message, “Incorrect syntax…”

Trigonometric Functions

Find the sine of a 30-degree angle:

(%i21) ! sind(30);

Maxima1_2

Find the sine of a 30-degree angle (in radians):

(%i25) sin(%pi/6);

Maxima1_3

Find the inverse sine of 1/2 (in degrees):

(%i26) asind(1/2);

Maxima1_4

Find the inverse sine of 1/2 (in radians):

(%i27) asin(1/2);

Maxima1_5

Similar functions exist for cos and tan.

Area of a Triangle

Calculate the area of a triangle given a=3, b=4, c=5 using Heron’s formula:

(%i28) heron(3,4,5);

Maxima2_6

Calculate the area of a triangle given a=12, b=13, and C=30-degrees (SAS):

(%i29) area_sasd(12,30,13);

Maxima2_7

Calculate the area of a triangle given A=20-degrees, b=5, and C=30-degrees (ASA):

(%i30) area_asad(20,5,30);

Maxima2_8

This last result isn’t very useful, so let’s turn it into a decimal approximation:

(%i32) float(%);

Maxima2_9[4]

% refers to the result of the previous calculation and float() turns that result into a decimal approximation.

Ambiguous Case (SSA)

Figure out how many triangles can ! be constructed if A=30-degrees, a=12, and b=10.

(% i33) ssad(30,12,10);

Maxima2_10

Solve Trigonometric Equations

Fortunately, Maxima is not very good when it comes to simplifying trigonometric expressions. However, when the equation reduces to a quadratic form, you can use Maxima to help check your work:

Ex: Solve cos(2x) = 2 cos(x) – 2 cos^2(x) in the interval [0, 360] to the nearest hundredth. Express your answer in degrees.

First, reduce this to a quadratic form: 4 cos^2(x) –2 cos(x) – 1 = 0.

Solve the equation in Maxima:

(%i45) solve(4*cos(! x)^2-2*cos(x)-1=0);

Maxima2_22

(%i46) float(%);

Maxima2_23[4]

Maxima returns two solutions in radians.

The first solution: there is also a third-quadrant angle where cosine is equal to the same value. Find the other solution:

(%i49) refd(d(1.884955592153876),! cos);

Maxima2_25

(%i50) float(%);

Maxima2_26

Given the measure of an angle x (in degrees) and the name of a trig function (in this case, cos), the function refd() will return the other angle z (between 0 and 360) where cos(z) = cos(x).

The second solution: there is also a fourth-quadrant angle w! here cosine is equal to the same value. Find the other solution:

(%i57) refd(d(0.62831853071796),cos);

Maxima2_30[4]

(%i58) float(%);

Maxima2_31[4]

Answer: 36, 108, 252, 324

Note: These are actually exact solutions.


trigonometry answers free

No comments:

Post a Comment