Tikz for f(x)=5x^2-2x and tangent line at 1,3

Click For Summary

Discussion Overview

The discussion revolves around plotting the function \( f(x) = 5x^2 - 2x \) along with its tangent line at the point (1, 3) using TikZ, a LaTeX package for creating graphics. Participants explore issues related to the plotting process, formatting challenges, and sharing experiences with visibility on social media platforms.

Discussion Character

  • Technical explanation, Experimental/applied, Meta-discussion

Main Points Raised

  • One participant seeks assistance in plotting the function and its tangent line, expressing frustration with the complexity of examples found elsewhere.
  • Another participant identifies a formatting issue with the TikZ code related to text alignment, suggesting a workaround to adjust the alignment by modifying the syntax.
  • A participant shares their progress on the plot, indicating they have made adjustments to the scaling for better visibility on LinkedIn.
  • One participant expresses interest in improving the visibility of their posts on Math Help Boards (MHB) and mentions the potential for LinkedIn to introduce an equation writer.

Areas of Agreement / Disagreement

The discussion includes multiple viewpoints regarding the plotting process and formatting issues, with no consensus reached on the best approach or solutions to the challenges presented.

Contextual Notes

Participants have not fully resolved the formatting issues with TikZ, and there are indications of varying levels of experience with the tool. The discussion also reflects different priorities regarding visibility and engagement on social media platforms.

Who May Find This Useful

This discussion may be useful for individuals interested in using TikZ for plotting mathematical functions, those facing similar formatting challenges, or participants looking to enhance their online presence in academic forums.

karush
Gold Member
MHB
Messages
3,240
Reaction score
5
Code:
\begin{tikzpicture}[xscale=2,yscale=.5]
      \draw[->] (-1,0) -- (4,0) node[right] {$x$};
      \draw[->] (0,-1) -- (0,5) node[above] {$y$};
      \draw[scale=0.5,domain=-1:3.5,smooth,variable=\x,black] plot ({\x},{\x*\x});
  \end{tikzpicture}

ok I am actually trying to plot
$f(x)=5x^2-2x$
with the tangent line going thru $(1,3)$ which is $8\left(x-1\right)+3$

I thot I could just change this from an example but does seem to like it
stack exchange had some samples but they got very complex with other features added

anyway mahalo ahead
why is the preview right justified
 
Physics news on Phys.org
There is a [right] in there.
It's the one big issue TikZ has on this site.
The forum software has its own idea what to do with [right], which is to right align text.

The work-around is to add spaces and make it [ right ].
 
Last edited:
ok, more tomorrow Mahalo
 
basically got it... maybe some more info on it
I flattened it since it is too tall to show on LinkedIn

\begin{tikzpicture}[xscale=1,yscale=.1]
[help lines/.style={black!50,very thin}]
\draw[-,thin] (-1,0)--(1.5,0) node[below] {$x$};
\draw[-,thin] (0,-1)--(0,6) node[above] {$y$};
\node [below] at (1,0) {$1$};
\draw[very thick,color=black] plot [domain={-1}:{1.5},smooth]
(\x,{5*\x*\x-2*\x)});
\draw[thin,color=red] plot [domain={0}:{1.5},smooth]
(\x,{8*\x-5)});
\end{tikzpicture}
 
hi
 
Last edited:
want to improve to markup on this MHB posts that I get over a 1000 views
on the few that I have posted already got over 1100 view from LindedIn
start to put the MHB link for those interested in a forum
their are many students on IN from my alma mater APU
I read somewhere that linkedin is going to have an equation wirterView attachment 11842
 

Similar threads

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