MathGroup Archive 2000

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

Search the Archive

Re: How can I teach Mathematica new functions

  • To: mathgroup at
  • Subject: [mg21724] Re: How can I teach Mathematica new functions
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 26 Jan 2000 03:45:27 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <86e8lb$>
  • Sender: owner-wri-mathgroup at

Hi, yes, 

you are wrong because you where to lasy. First of all you should *not*
define an explicit sbj[_,_] when you don't like to use the build in
functions. You
must define rules for

Derivative[0,1][sbj][n_,z_]:= ..

and rules for simplifications of spherical bessel functions than you
Mathematica taught a new function and Mathematica will work with it
like a build in one. 

You has only created a short reference to e build in function and it no
wonder that you only get bild in functions out.


gargamel wrote:
> Hello all,
> This is a real example, but my qestion is general:
> Suppose I define a new function, namely a spherical bessel function:
> sbj[n_,z_]=Sqrt[Pi/(2*z)]*BesselJ[n+1/2,z]
> Now I can easily do all kind of manipulations on my function.
> For example, by typing:
> D[sbj[n,x],x]
> I get a fancy expression in terms of the BesselJ function (which I won't
> copy here).
> But I would want a simpler expression in terms of my function sbj
> (which would be:
> -sbj(n,x)/(2x)+1/2*(sbj(n+1,x)-sbj(n-1,x))
> if I'm not mistaking).
> So basically what I want to do is to teach Mathematic the new function and
> ask it
> to use it to "simplify" results. It would also be nice if Mathematica's
> functions Simplify
> and FullSimplify would be able to incorporate new functions that I defines.
> I didn't find any way to do this. It seems to me that Mathematica knows only
> what
> It was taught at the "factory". Sure, you can define new function and even
> due some
> manipulations on them but they never become a real part of Mathematica's
> knowledge
> (and Mathematica will never give you your function as an answer to a
> problem).
> Am I wrong?

  • Prev by Date: Re: DSolve problems with system of ODEs. Out in pure notation?
  • Next by Date: Re: cellular automata and OOP
  • Previous by thread: Re: How can I teach Mathematica new functions
  • Next by thread: Re: Re: How can I teach Mathematica new functions