# Quick and dirty math on the internet

Click on RELOAD now. This page is frequently updated and you might be looking at an old version saved by your netscape cache.

I explain here how I use maple to respond to an e-mail query like the one below:

```To: bell@math.purdue.edu
From: goober@cartoon.ecn.purdue.edu
Subject: HELP!!!!

For the last 72 hours I have been trying to solve the equation
x y' + y = 1.  I'm beginning to think that it doesn't have a

Jimmy Goober

P.S.  My roomate wants me to ask you what the integral
of x^2 sin(7x) is.
```

I shall now dispose of these questions in a few simple keystrokes. First, I start an e-mail message to Mr. Goober in an xterm using an editor like vi. Then I fire up maple in another xterm by typing

```maple
```

NOTE: That's maple, not xmaple. I want the ASCII terminal version of maple for this task.

After I type maple, I see

```hua-231% maple

|\^/|     Maple V Release 4 (WMI Campus Wide License)
._|\|   |/|_. Copyright (c) 1981-1996 by Waterloo Maple Inc. All rights
\  MAPLE  /  reserved. Maple and Maple V are registered trademarks of
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.

>
```

Next I type the following commands at the > prompt.

```> Diff(y,x) + (1/x)*y= 1/x;

dy
--  + y/x = 1/x
dx

> u(x)= exp( Int( 1/x , x ) );
/
|
u(x) = exp( |  1/x dx)
|
/

> Int( x^2 * sin(7*x) , x) = int( x^2 * sin(7*x) , x ) + C;

/
|  2                      2
| x  sin(7x) dx = - 1/7 x  cos(7x) + 2/343 cos(7x) + 2/49 x sin(7x) + C
|
/

```

To answer Mr. Goober in a prompt and courteous fashion, I shall click with my left mouse button at the start of a portion of maple output that I want to copy to my e-mail and then I shall click with the right mouse button at the end of the text to select it. Then I shall click with the middle mouse button while in input mode of vi in my e-mail to insert the selected text from maple in the e-mail. (If you're a dexterous mouser, you can left mouse click and drag over the text to select it ---and then right mouse click to adjust the ending point.)

Note: If you use vi, you'll want to set your wrapmargin to zero before you glob text into your file with the middle mouse button. To do this, simply type

:set wm=0

in command mode of vi.

Here is the result of my efforts:

```Dear Mr. Goober,

Notice that you can divide your ODE by x to obtain

dy
--  + y/x = 1/x ,
dx

a first order linear ODE in standard form.  The integrating factor
will be
/
|
u(x) = exp( |  1/x dx ) = x .
|
/

Use this as in Section 1.3 of B & D to get the solution in the
back of the book.

See you in class on Monday?

/
|  2                      2
| x  sin(7x) dx = - 1/7 x  cos(7x) + 2/343 cos(7x) + 2/49 x sin(7x) + C
|
/

```

As you can see, this is also a nice way to display mathematics on the web. That last equation was set in HTML via

```<P>
<PRE>
/
|  2                      2
| x  sin(7x) dx = - 1/7 x  cos(7x) + 2/343 cos(7x) + 2/49 x sin(7x) + C
|
/
</PRE>
```

Back to the Network News Index Page