Message Boards Message Boards

[?] Solve equation and find x for y=0, 0.2, 0.4,.......,1.4?

Posted 4 years ago

I'm trying to solve for x form the equation x^2+(2*y^2)=4. I need to determine x on the intervals y=0, 0.2, 0.4,.....,1.4 for every value of y. Kindly, help!

Thanks.

2 Replies
Posted 4 years ago

Hi Prasad,

I think this is what you are looking for.

eqn = x^2 + (2*y^2) == 4;
sol = Solve[eqn, x]
sol /. y -> Range[0, 1.4, 0.2]
(* {{x -> {-2., -1.9799, -1.91833, -1.81108, -1.64924, -1.41421, -1.0583, -0.282843}}, 
    {x -> {2., 1.9799, 1.91833, 1.81108, 1.64924, 1.41421, 1.0583, 0.282843}}} *)
POSTED BY: Rohit Namjoshi

Thank you very, Rohit. This is what I was looking for!

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