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

AI Thread Summary
The discussion centers around plotting the function f(x) = 5x^2 - 2x and its tangent line at the point (1,3), represented by the equation 8(x-1) + 3. The user expresses frustration with the complexity of examples found on Stack Exchange and seeks a simpler approach. There are technical issues mentioned regarding the formatting of TikZ graphics, specifically the right alignment of preview text due to the forum software's handling of the [right] command. A workaround is suggested involving spaces to adjust alignment. Additionally, the user shares their intention to improve markup for their posts on the Math Help Board (MHB), noting that previous posts received significant views on LinkedIn. They mention an upcoming feature on LinkedIn that will include an equation writer, which could enhance their content sharing.
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

Back
Top