Message Boards Message Boards

0
|
2278 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Define solution for automated notebooks

Good evening

I have tried to find a solution for some time now, but have not found an answer, so I hope that you can help. I am looking to make automated solutions for specific exam question types. I am running into a problem, however.

When using operations such as Solve[ ], the output might look something like: "x --> n". To calculate the next step using "x = n", I currently need to define this manually.

Is there any way to automatically assign x the value n found using commands like Solve[ ]?

With regards.

2 Replies

Thank you.

Still new to the software and this helped a lot.

Been tweaking it for the last hour or so and it works perfectly.

Not quite sure I understand your question. Do you want something like that?

x = x /. Solve[x^2 + a x + 1 == 0, x]

Check also this example in the documentation of Solve, which make a convenient way to substitute solutions in other formulas of code

eqns = {x^2 + y^2 == 1 && 2 x + 3 y == 4};
eqns /.Solve[eqns, {x, y}]
POSTED BY: Ahmed Elbanna
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