I am pretty new to Mathcad Prime and just learning things. Wanted to know is it possible to get all the possible solutions for the solve block and not just one?
I have attached worksheet. Thank you for the help
Vic
Solved! Go to Solution.
@VR_9781959 wrote:
I am looking to expand the result i,e the vector:answer in the example would be of seven integers
Seven? If you really mean only integer solutions, the result must be a vector of 15 values!!
But you sure can limit the solutions to positive integers if thats what you are looking for:
Unfortunately the above only works in real Mathcad and in Prime up to version 6 (if you chose to use the "Legacy Symbolic Engine", muPad). The new engine built into Prime 7 (Axiom) is less capable than the older one (which in no way was state of the art, either). Here is what you see when you use the new engine:
Correct and disappointing at the same time.
-Also, is it possible to define a number to an integer?
Only with assume when you use the symbolic engine, as you have just seen. And very often this modifier is simply ignored by the engine. Prime is not an appropriate tool for diophantic equations.
A solve block in Prime can only be used to find numerical answers/results. You do not want a list of all possible numerical answers to the equation a^2 <= 49, because that list is infinitely long.
The solution is potentially easier found using the symbolic method (look up symbolic solvers in Prime):
(In Prime it looks different from the above).
Note that Prime has little to no provisions to work with integer values only. That is, it is difficult towards impossible, to force Prime to produce answer that only have whole numbers.
Success!
Luc
Thank you Luc for the information also, when I try to use the solve block with odesolve its not behaving as it should am I doing it right?
Vic
Why would you use "odesolve" when you have no ODE?
Its unclear to me what you actually are trying to achieve and what kind of result you are expecting.
You may want to lookup the usage of odesolve in the online help
I am looking to expand the result i,e the vector:answer in the example would be of seven integers
-Also, is it possible to define a number to an integer?
@VR_9781959 wrote:
I am looking to expand the result i,e the vector:answer in the example would be of seven integers
Seven? If you really mean only integer solutions, the result must be a vector of 15 values!!
But you sure can limit the solutions to positive integers if thats what you are looking for:
Unfortunately the above only works in real Mathcad and in Prime up to version 6 (if you chose to use the "Legacy Symbolic Engine", muPad). The new engine built into Prime 7 (Axiom) is less capable than the older one (which in no way was state of the art, either). Here is what you see when you use the new engine:
Correct and disappointing at the same time.
-Also, is it possible to define a number to an integer?
Only with assume when you use the symbolic engine, as you have just seen. And very often this modifier is simply ignored by the engine. Prime is not an appropriate tool for diophantic equations.
odesolve is for solving ordinary differential equations, as you may guess, and the solve block does not contain an ODE...