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

MathGroup Archive 2002

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

Search the Archive

Problem with user defined functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37340] Problem with user defined functions
  • From: Farhat Habib <farhat at pacific.mps.ohio-state.edu>
  • Date: Thu, 24 Oct 2002 02:55:33 -0400 (EDT)
  • Organization: Ohio State University
  • Sender: owner-wri-mathgroup at wolfram.com

Hello all,

I am trying to evalute a function which looks like this. This is an
analogous problem not the actual problem.

test[x_] := p /. FindRoot[Sin[p] == x, {p, 1}][[1]]
data[x_] := D[test[x], x]
Plot[data[x], {x, 0, 1}]

Now, when trying to evaluate the derivative mathematica replaces both the
x's with the number at which it is trying to calculate the datapoint. This
gives an error of 'xxxx is not a valid variable'. Replacing D[test[x]]
with test'[x] doesn't help either though it results in a different set of
errors. Is there any of way of getting around this problem?

Thanks in advance,

Farhat



  • Prev by Date: help on bootstrap sample
  • Next by Date: Re: Getting symbols out of list returned by solve
  • Previous by thread: RE: Re: help on bootstrap sample
  • Next by thread: Re: Problem with user defined functions