# Problem with Solve (error message Solve::nsmet)

Posted 2 months ago
455 Views
|
4 Replies
|
2 Total Likes
|
 Hello, I am trying to solve this equation: Solve[{D[prof[p],{p}]==0},{p}] where the function prof is defined the following way: prof=pn^(sigma-1)*y*p^(-sigma)(p-c) Mathematica sends me an error message: Solve::nsmet This system cannot be solved with the methods available to Solve.What should I do ? Can I use some other function instead of Solve?
4 Replies
Sort By:
Posted 2 months ago
 You have several errors in defining the function prof. First of all, in order to make the function applicable to its variable in that way prof[p], then you need to define it in the following way prof[p_] := p n^(sigma - 1) y p^-sigma (p - c); notice that there is a space between p and n which indicate a multiplication, without the space pn will be considered as a new variable.Then you can proceed with the differentiation and solving Solve[{D[prof[p], {p}] == 0}, p] 
Posted 2 months ago
 Thank you very much, pn was actually some other paramter not linked to the variable p, but declaring the function as prof[p_] made the trick.
 Just remove some extra brackets: prof = pn^(sigma - 1)*y*p^(-sigma) (p - c); Solve[D[prof, p] == 0, p]