Message Boards Message Boards

0
|
4787 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Expression Evaluation

Posted 11 years ago

In Mathematica v10, this happens:

enter image description here

Questions:

Why is the derivative of y=f(x) not evaluated inside the integral to give 2x?

How can I re-write the input to cause the expression inside the integral to be evaluated prior to performing integration (definite)?

I'm trying to think back to my Lisp days for a hint, but it's not helping :)

~CM

POSTED BY: Calvin Morris

The y that you defined using an delayed evaluation is not a function (it has no arguments). Define it like this instead:

y[x_] := x^2

(As an aside, your parameters a and b do not need to be defined using a delayed evaluation.)

Although Mathematica has some elements inherited from Lisp, its syntax is not the same. So guessing proper syntax is likely to elad to all sorts of problems. A quick course on things for folks coming from other languages is here and can be helpful in getting you jumpstarted in using Mathematica and divorcing you from pre-suppositions when thinking of other languages that you know:

http://www.wolfram.com/language/fast-introduction-for-programmers/interactive-usage/

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract