What is the Graph of $f(x)=3\cos(\pi x-2)+5$ with Amplitude and Period?

  • Context: MHB 
  • Thread starter Thread starter karush
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the graph of the function \( f(x) = 3\cos(\pi x - 2) + 5 \), focusing on its amplitude and period. Participants explore various aspects of graphing this function using TikZ, including transformations and the representation of key features such as maximum and minimum points.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants share TikZ code snippets to graph the function, attempting to visualize it over two periods.
  • There are discussions about the correct transformation of the function and the representation of amplitude, with some participants noting the need for ticks at min/max points.
  • One participant questions the conversion from radians to degrees in the TikZ code, suggesting an alternative expression for the cosine function.
  • Participants express uncertainty about the accuracy of their graphs, indicating that they are still refining their representations.

Areas of Agreement / Disagreement

There is no consensus on the final representation of the graph, as participants continue to refine their approaches and express uncertainty about specific details.

Contextual Notes

Limitations include unresolved questions about the correct transformation of the function and the representation of angles in radians versus degrees. Some participants have not yet finalized their graphs.

karush
Gold Member
MHB
Messages
3,240
Reaction score
5
$f(x)=3\cos(\pi x-2)+5$

ok I tried to find a tikz graph online but most were too involved
basically 2 periods
show only ticks for xy intersections and light dashed lines for Amplitude
no background grid just xy axis

ok founut d this it renders in overleaf but not here
also, transformation is not yet applied
\begin{tikzpicture}[help lines/.style={black!50,very thin}]
\draw[<->,thick] (-4.25,0)--(4.25,0) node
{$x$};
\draw[<->,thick] (0,-4.25)--(0,4.25) node[above] {$y$};
\draw[very thick,color=green] plot [domain={-360/90}:{360/90},smooth] (\x,{cos(90*\x)});
\end{tikzpicture}Mahalo​
 
Last edited:
Physics news on Phys.org
\begin{tikzpicture}[help lines/.style={black!50,very thin}]
\draw[<->,thick] (-4.25,0)--(4.25,0) node {$x$};
\draw[<->,thick] (0,-4.25)--(0,4.25) node[above] {$y$};
\draw[very thick,color=green] plot [domain={-360/90}:{360/90},smooth] (\x,{cos(90*\x)});
\end{tikzpicture}

Seems to work for me here.

This is what you posted:
1642042750902.png
It's what we see when we switch to source mode, the wheel at the right top that looks like this:
1642042794813.png


Note the [RIGHT] and [/RIGHT] that are breaking up the TikZ code, and which aligns part of it to the right.
Can't have those. If we remove those markers, then the TikZ picture is rendered as it should.

It seems you accidentally aligned some of the text to the right, which happens if we select this option:
1642043079910.png
 
Last edited:
\begin{tikzpicture}[help lines/.style={black!50,very thin}]
\draw[<->,thick] (-12,0)--(12,0) node {$x$};
\draw[<->,thick] (0,-1)--(0,6) node[above] {$y$};
\draw[very thick,color=black] plot [domain={-360/90}:{360/90},smooth] (3*\x,{cos(90*\x-2)+5});
\end{tikzpicture}

$f(x)=3\cos(\pi x-2)+5$
transform for 2 periods
ok just added A and B i think
but not PS or T
 
\begin{tikzpicture}[xscale=.25,yscale=.5]
[help lines/.style={black!50,very thin}] \draw[<->,thick] (-12,0)--(12,0) node[below] {$x$};
\draw[<->,thick] (0,-1)--(0,6) node[above] {$f(x)$};
\draw[very thick,color=black] plot [domain={-360/90}:{360/90},smooth] (3*\x,{cos(90*\x-2)+5});
\end{tikzpicture}

Ok now I have to do the ticks for the min/max points of the graph
 

karush

Well-known member

Jan 31, 2012 3,175
MHB TikZ Code
\begin{tikzpicture}[xscale=.25,yscale=.5] [help lines/.style={black!50,very thin}] \draw[<->,thick] (-16,0)--(16,0) node[below] {$x$};
\draw[<->,thick] (0,-1)--(0,6) node[above] {$f(x)$};
\node [below] at (-4*3.1416,0) {-4$\pi$};
\node [below] at (-2*3.1416,0) {-2$\pi$};
\node [below] at (2*3.1416,0) {2$\pi$};
\node [below] at (4*3.1416,0) {4$\pi$};
\draw[very thick,color=black] plot [domain={-360/90}:{360/90},smooth] (3*\x,{cos(180*\x-2)+5});
\end{tikzpicture}

ok still don't have this graph right...
 
Last edited:
In the TikZ code, where do you get "cos(90*\x - 2)" from? If you want to change $\pi x-2$ from radians to degrees, I would expect to get 180*\x - 114.59, since 2 radians is (approx.) 114.59 degrees.
 
\begin{tikzpicture}[xscale=1,yscale=.5]
[help lines/.style={black!50,very thin}]
\draw[-,thick] (-4,0)--(4,0) node[below] {$x$};
\draw[-,dashed] (-4,2)--(4,2) node[below] {$y=2$};
\draw[-,dashed] (-4,8)--(4,8) node at (5,8) {$y=8$};
\draw[-,dashed] (-4,5)--(4,5) node[below] {$y=5$};
\draw[->,thick] (0,-1)--(0,8) node[above] {$f(x)=3cos(\pi x-2)+5$};
\node [below] at (-3.1416,0) {-$\pi$};
\node [below] at (3.1416,0) {$\pi$};

\draw[very thick,color=black] plot [domain={-180/90}:{180/90},smooth]
(\x,{3*cos(180*\x-2)+5});
\end{tikzpicture}
 
Last edited:

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • Poll Poll
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 0 ·
Replies
0
Views
6K