MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Deriviation

  • To: mathgroup at
  • Subject: [mg70086] Re: Deriviation
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Tue, 3 Oct 2006 06:16:26 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <efq53o$228$>

Karsten Ohme wrote:
> Hello,
> I have the following problem, e.g. I derive a function like:
> In[1]:=
> f[x] = x^2;
> In[2]:=
> D[f[x], x]
> Out[2]=
> 2 x
> Quite well, but now I want to use it in my own application, so I look
> for a free library written in Java (or C) which can do also a symbolic
> derivation outside Mathematica. Is there something like this?
> Thanks, Karsten
Hi Karsten,

Within a Mathematica notebook, you can use functions such as CForm [1] 
to get a get a translation of the Mathematica expression to a C expression:

f[x] = x^2;
D[f[x], x]

2 x


You can also ask Mathematica to process a source or document file 
written, say in C or any other languages, that includes Mathematica 
code, with the Splice function. See [2] for an example in C.



[2] /The Mathematica Book/, Section 1.11.9, "Splicing Mathematica Output 
into External Files"

  • Prev by Date: Performance--Dual Core
  • Next by Date: Re: Input, output troubles me ...
  • Previous by thread: Deriviation
  • Next by thread: Re: Linear regression, error on both vaules x and y