I am new to Mathematica. I am trying to create a program that takes in an equation from user input and then gives the answer. I started with a manipulate function as I created a similar program for graphs, but it didn't allow the range of equations I wanted it to, so I found the Input function. Here is my code:

Solve[Input["Give an equation to be solved, with x as the variable. There can only be one undefined variable. Put in two equals signs instead of one."], x]

When I evaluated the cell, it gave me a screen showing a my prompt and a box saying Hold[Null]. I tried replacing the entire phrase with my equation and replacing Null with my equation; both times it didn't show anything on the prompt box and when I exited the mini screen with the prompt it gave this error as output:

Solve::naqs :$Failed is not a quantified system of equations and inequalities

I'm not really sure what I did wrong after looking at the documentation. It could be something to do with how I'm inputting my response. Here's a screenshot of what I inputted:

screenshot of input into program

Any help would be appreciated.


Is there a problem with the input dialog box using Mathematica Online?

  • $\begingroup$ Try adding Evaluate[] before input $\endgroup$ – Young Jun 19 '16 at 21:10
  • $\begingroup$ I added Evaluate[] and it didn't work. I am using Mathematica Online, so I don't know if that has anything to do with it. I also realized that there is a loading symbol at the bottom of my input screen; could the problem have anything to do with that? $\endgroup$ – heather Jun 19 '16 at 21:15
  • $\begingroup$ I tried it in Woflram Cloud (free account), and no matter what I do, Input[] always returned $Failed. Something is wrong with it. Bug? $\endgroup$ – Szabolcs Jun 19 '16 at 21:26
  • 1
    $\begingroup$ Works on the desktop version but not online. $\endgroup$ – Young Jun 19 '16 at 21:29
  • 1
    $\begingroup$ There is no need for Evaluate because Solve has no Hold* attributes. It's a problem specific to the online version. $\endgroup$ – Szabolcs Jun 19 '16 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.