Message Boards Message Boards

Problem with Solve (error message Solve::nsmet)

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

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 BY: Ahmed Elbanna

Just remove some extra brackets:

prof = pn^(sigma - 1)*y*p^(-sigma) (p - c);
Solve[D[prof, p] == 0, p]
POSTED BY: Gianluca Gorni

Thank you very much, that worked!

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.

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