Mathematica Mathematica: What is happening?

  • Thread starter Thread starter Saladsamurai
  • Start date Start date
  • Tags Tags
    Mathematica
AI Thread Summary
The discussion revolves around a user's confusion regarding the Mathematica function D[f,x], which is intended to compute the partial derivative of a function. The user initially expected the derivative of the function V_θ = (A/r^2 + B)sin(θ) with respect to θ to yield (A/r^2 + B)cos(θ). However, Mathematica returned an unexpected result, leading to questions about its output. The user later realized that the issue stemmed from incorrect syntax, specifically the use of a capital 'S' in Sin and the need for square brackets, Sin[θ]. This correction resolved the confusion, reaffirming the importance of proper syntax in Mathematica for accurate calculations.
Saladsamurai
Messages
3,009
Reaction score
7
Ok, I have either completely lost it (very likely) or Mathematica is being weird (much less likely). The finction D[f,x] is supposed to return the partial of f with respect to x, \partial{f}/\partial{x}.

So I have a function V_\theta = (A/r^2 + B)\sin\theta where A and B are constants. So we should have \partial{V_\theta}/\partial{\theta} = (A/r^2 + B)\cos\theta.

But here is what mathematica is returning. What does that even mean? Why does it just say "sin" and not have the argument? Moreover, why does it not say cos ?!
 

Attachments

  • Screen shot 2011-02-12 at 3.58.41 PM.png
    Screen shot 2011-02-12 at 3.58.41 PM.png
    2.8 KB · Views: 536
Physics news on Phys.org
Got it! 2 mistakes on my part :redface: capital 's' in Sin and square brackets Sin[theta].

All is good again in the world of Wolfram!
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
Replies
4
Views
1K
Replies
2
Views
2K
Replies
5
Views
3K
Replies
6
Views
7K
Replies
1
Views
2K
Replies
3
Views
2K
Replies
19
Views
2K
Back
Top