Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Integer Values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8583] Re: [mg8566] Integer Values
  • From: seanross at worldnet.att.net
  • Date: Sun, 7 Sep 1997 22:13:03 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Adrean Webb wrote:
> 
> Hello.  I'm having trouble defining constants in Mathematica as integer
> values.  For example, how do you define a constant C such that
> Mathematica performs the derivative of x^C as Cx^(C-1)dx?  Is this
> possible?
> 
> Thanks
> Adrean

D[x^n,x] returns n x^(-1+n) whether or not n is an integer.  The only
way I am familiar with "declaring" a symbol to be integer is to put in a
function construct specifying the parameter as an integer(ie
f[x_Integer], but all this does is prevent the function from executing
if the parameter is not an integer.  Personally, I think that one of the
weaknesses of mathematica is the "typelessness" of the language.  It is
odd that it doesn't have this feature since it is written in c, which is
a type-based language.


  • Prev by Date: Re: NDSolve
  • Next by Date: Re: Something like Flatten
  • Previous by thread: Integer Values
  • Next by thread: Re: Re: Integer Values