Solving from previous results

I require in this program to use only all the value of “p” form “solution 1” in “solution 2”. Instead of copy and paste each value of “p” individually in solution 2, I am trying to write a function to automatically calculate “da” and “s” from all output “p” in the same manipulate. Thanks for your help.

Table[
Take[Solve[
-10 p - 26 t == 5 &&
-5.3 p + 19 t == (var1 - 50),
{p, t}]], {var1, 10, 30, 4}] // Flatten(*solution 1*)

f[p_, t_] := Take[# & p]

Manipulate[
Solve[
2.88286(*to include all values of p from solution 1*)==
0.42 - 2.4 s + 1.52 c &&
da == 15 - 1.4 s + 0.425723972217329 c],
{c, 10, 50}](*solution 2*)


It is not quite clear what are you after. Assuming that you want to get on the screen simultaneously the solutions of the equation 2 with all the values of p from the equation 1, try this

Manipulate[
lst1 = Table[
Solve[-10 p - 26 t == 5 && -5.3 p + 19 t == (var1 - 50)], {var1,
10, 30, 4}] /. {{x_, y_}} -> x[[2]] // Quiet;
NSolve[{# == 0.42 - 2.4 s + 1.52 c,
da == 15 - 1.4 s + 0.425723972217329 }, {da, s}] & /@ lst1, {c,
10, 50}]


Have fun!

• This looks the same as the answer I posted here earlier. – Rohit Namjoshi May 26 at 19:52