Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Replacing a variable with a solution?' topicStudent Support Forum > General > Archives > "Replacing a variable with a solution?"

Next Comment >Help | Reply To Topic
Author Comment/Response
01/18/13 5:45pm


I am trying to define a variable (k1) as the expression that is given as one of the possible solutions from the Solve function so that when I have "k1" further in the program, it will use the solution from the Solve function.

Here is the code in question, simplified:

Input: Solve[Eq4==0,k1]

Output: {{k1-> 4.3*(2.4+1.4*c2+Sqrt[4.6*c2^2+2.02*c2^4]},{k1->4.3*(2.4+1.4*c2-Sqrt[4.6*c2^2+2.02*c2^4]}

So then I have been typing k1:= on the next line and copy-pasting this part in to get:


So that I can use it in:

Eq3:=m1*k3+m3*k1+c1*c3-c2^2 Solve[Eq3==0,c2]

To get a value for c2. Surely there is a way to avoid copy-pasting? I feel like the . is supposed to come into play, but I don't understand the syntax for it and can't figure out what to search for to use it!

Thanks! Kaitlin

URL: ,

Subject (listing for 'Replacing a variable with a solution?')
Author Date Posted
Replacing a variable with a solution? Kaitlin 01/18/13 5:45pm
Re: Replacing a variable with a solution? Bill Simpson 01/20/13 9:41pm
Re: Re: Replacing a variable with a solution? Kaitlin 01/21/13 12:13pm
Next Comment >Help | Reply To Topic