Message Boards Message Boards


Use solve command to determine a shift value for graph?

Posted 6 months ago
2 Replies
2 Total Likes


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.


2 Replies

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}} *)
   (* {{c -> 2.13534}} *)

   (eq /. x -> 1) /. sol
   (* {True} *)
Posted 6 months ago

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

Thanks again.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract