[LUGSB] texmacs and maxima
Sarang Lakare
sarang at users.sourceforge.net
Sat Aug 9 22:02:44 EDT 2003
> But first, I invite you to join the TeXmacs users mailing list. You can
> find subscription details on www.texmacs.org. You'll pick up lots of neat
> tricks and Scheme macros to make your TeXmacs experience much more
> pleasant.
I am already on too many lists :( But if I get into too much trouble, I will
:)
> First, you need to have Octave and/or Maxima installed and in your
> PATH environment variable so that TeXmacs can find it.
>
> Then, you just launch TeXmacs.
I found the bug.. I do have octave and maxima installed.. but I installed them
after I had started texmacs the first time. Looks like texmacs checks for
those program only on first start. So i delete ~/.TeXmacs directory and
restarted the program.. now it does find octave and maxima!
> For generating mathematical plots or functions within TeXmacs documents,
> Octave is probably the better choice. I am the author/maintainer of the
> Octave <-> TeXmacs code though, so I'm biased :) But.. last time I
> checked, Maxima couldn't generate a plot into TeXmacs.
>
> OTOH, the Maxima glue is a bit more stable than that for Octave.
I am using maxima because I need to solve 2 equations. Can this be done in
Octave? In any case, as it turns out, I am not able to solve the equations in
maxima.. But Maple solves the successfully. These are the three equations:
A = d*exp(-a*r^2); eqn1
B = diff(eqn1,r); eqn2
C = diff(eqn2,r);
Now I want to solve the three to get values of d, a, and r. A, B, C are
constants. Maxima gives this output:
(C9) solve([D1,D2,D3]);
(D9) [[r = %R1, a = %R2, d = 0]]
I will be really glad if someone can point what I am doing wrong. The maxima
commands I give are:
(C1) d*exp(-a*r^2);
(C2) diff(D1,r);
(C3) diff(D2,r);
and then the solve command (C9) above.
Thanks a lot!
Sarang
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sarang Lakare
mailto:sarang at users#sourceforge.net
web:http://www.cs.sunysb.edu/~lsarang/linux
!!Join the fight for freedom - Go GNU/Linux!!
>From mgraffam at mathlab.sunysb.edu Sun Aug 10 09:55:37 2003
Received: from SunRa.mathlab.sunysb.edu (SunRa.mathlab.sunysb.edu
[129.49.17.48])h7ADtbN8024021
for <lugsb at fsl.cs.sunysb.edu>; Sun, 10 Aug 2003 09:55:37 -0400
Received: from SunRa.mathlab.sunysb.edu (localhost [127.0.0.1])
h7ADuuA8020658
for <lugsb at fsl.cs.sunysb.edu>; Sun, 10 Aug 2003 09:56:56 -0400 (EDT)
Received: from localhost (mgraffam at localhost)h7ADuuuZ020655
for <lugsb at fsl.cs.sunysb.edu>; Sun, 10 Aug 2003 09:56:56 -0400 (EDT)
X-Authentication-Warning: SunRa.mathlab.sunysb.edu: mgraffam owned process
doing -bs
Date: Sun, 10 Aug 2003 09:56:56 -0400 (EDT)
From: Michael Graffam <mgraffam at mathlab.sunysb.edu>
To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
Subject: Re: [LUGSB] texmacs and maxima
In-Reply-To: <200308092202.44919.sarang at users.sourceforge.net>
Message-ID: <Pine.GSO.4.44.0308100950490.19684-100000 at SunRa.mathlab.sunysb.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://porky.devel.redhat.com/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Sun, 10 Aug 2003 13:55:38 -0000
On Sat, 9 Aug 2003, Sarang Lakare wrote:
> I am using maxima because I need to solve 2 equations. Can this be done in
> Octave? In any case, as it turns out, I am not able to solve the equations in
> maxima.. But Maple solves the successfully. These are the three equations:
No, Octave doesn't perform symbolic computations (yet?). It is a numerical
environment, like MATLAB.
> (C9) solve([D1,D2,D3]);
> (D9) [[r = %R1, a = %R2, d = 0]]
>
> I will be really glad if someone can point what I am doing wrong. The maxima
> commands I give are:
>
> (C1) d*exp(-a*r^2);
> (C2) diff(D1,r);
> (C3) diff(D2,r);
>
> and then the solve command (C9) above.
Well, right off the top you'll notice that nowhere in your computations
do you equate your expressions to your constants A,B,C. This is why
you get the bogus answer.
Here is how I solved your problem with Maxima:
GCL (GNU Common Lisp) Version(2.4.0) Thu Mar 28 08:08:45 EST 2002
Licensed under GNU Library General Public License
Contains Enhancements by W. Schelter
Maxima 5.6 Thu Mar 28 08:08:39 EST 2002 (with enhancements by W. Schelter).
Licensed under the GNU Public License (see file COPYING)
(C1) d*exp(-a*r^2);
2
- a r
(D1) d %E
(C2) diff(D1,r);
2
- a r
(D2) - 2 a d r %E
(C3) diff(D2,r);
2 2
2 2 - a r - a r
(D3) 4 a d r %E - 2 a d %E
(C4) solve([A=D1,B=D2,C=D3],[a,d,r]);
2
B
- ------------
2 2
A C - B 2 A C - 2 B A B
(D4) [[a = - --------, d = A %E , r = --------]]
2 2
2 A A C - B
(C5)
Hope that helps.
More information about the lugsb
mailing list