Message Boards Message Boards

Error from FindRoot: The function value is not a list of numbers

Posted 1 month ago

I'm trying to calculate a FindRoot or Solve for the intersection of two non-linear equations, any suggestions on how to remedy the errors?

Attachments:
Posted 1 month ago

Hi Jonathan,

The function passed to FindRoot needs an argument

equilibriumPrice = FindRoot[Difference[price], {price, 60}]
(* {price -> 58.1167} *}

The Print does not have a terminating ; so it is implicitly multiplied by whatever follows, and equilibriumPrice is not extracted correctly

Print["Equilibrium price:", equilibriumPrice[[1, 2]]]; 
demand[maxDemand, rateChangeDemand, price, priceAtHalfMaxDemand] - 
 supply[maxSupply, rateChangeSupply, price, priceAtHalfMaxSupply]
POSTED BY: Rohit Namjoshi
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