TransWikia.com

Graph a function with frac

TeX - LaTeX Asked on September 13, 2020

I need to graph the function
f(s)=frac{s^3+7s^2+9s-128}
{s^2+15s+24} ,where s greater than zero,
please help me…

One Answer

This can be done using the package tikz. The following code shows how you can draw (any) graph using this package.

documentclass[12pt]{report}

usepackage{tikz}

begin{document}

begin{tikzpicture}
  draw [gray,dotted] (0,-6) grid (10,7) ;
  draw[->,>=latex] (0,0) -- (10,0) node[below]{$s$} ;
  draw[->,>=latex] (0,-6) -- (0,7) node[left]{$f(s)$} ;

  draw [domain=0:10,samples=200] plot (x,{(x^3+7*(x)^2+9*x-128)/((x)^2+15*x+24}) ;
end{tikzpicture}

end{document}

This graph is drawn in the domain [0,10] with 200 samples. This can be adjusted according to what domain you want use and how smooth you want the curve to be.

Correct answer by G. de Man on September 13, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP