On Mar 30, 6:07 pm, Jason Grout <[email protected]> wrote: > V wrote: > > Hi, > > > I'm fairly new to sage with some background in maxima. > > > My workbook is shared at > >http://www.sagenb.org/home/pub/410/ > > > the last three lines show the error I get. > > > Basically, I derive an equilibrium condition that I would like to use > > in the previous stage of my game (solving by backwards induction), but > > maxima fails (line -2) with simplifying after the substitution is > > made, even though the substitution is successful (line -3). > > > I expect to receive the line in the last "paragraph" as defined by > > D1p. > > > Is this a bug or did I made a mistake? > > In this line, > > solve([q1==q1.substitute(q2=sol2[0][1].right()).simplify_full()], q1) > > you are trying to solve for "q1", but q1 is not a variable, it's the > expression: > > f2^alpha*p1^(alpha - 1)*p2^(beta - alpha*beta)*q2^alpha*A^(1 - alpha)/f1 > > Did you mean to solve for a variable in the solve statement above? >
The expression in the solve line would be a demand function where q stands for quantity. But as it is derived from a later stage of the game, q is present on the "right hand side" as well, and I would like to express the demand function explicitly, that is I have q=f(q,x) where x are all the other parameters and q is defined implicitly, and I would like to have q=g(x). I thought solve would do this for me, even though I already understand why it doesn't, I still don't know how to do it. Could you give me a hint, please? Thanks, V --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
