Message Boards Message Boards

Use solve command to determine a shift value for graph?

Posted 5 years ago

Hello,

I have created a code for my graph: Manipulate[Plot[E^-2 x Cos[Pi x] + c, {x, -3, 4}], {c, 0, 3}] Using the sliders, it appears that F[x] must be shifted up approximately 2.12341 units up in order to pass through the point (1,2). However, I would like to know how to use the solve command to determine what the exact shift value is for the graph to pass through (1,2). I have already tried looking up the Mathematica solve command, but I could only find articles for other equations and none that could help me in this case.

Thank you.

Attachment

Attachments:
POSTED BY: Keanu Davis
2 Replies
Posted 5 years ago

Mariusz, I really really appreciate you and your help as always... very kind of you.

Thanks again.

POSTED BY: Keanu Davis

for $x=1$ function should be equal to $2$.

   eq = E^-2 x Cos[Pi x] + c == 2;
   sol = Solve[eq /. x -> 1, c]
   (* {{c -> (1 + 2 E^2)/E^2}} *)
   %//N
   (* {{c -> 2.13534}} *)

   (eq /. x -> 1) /. sol
   (* {True} *)
POSTED BY: Mariusz Iwaniuk
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