Page 1 of 1

Solve with python in jupyter notebook

Posted: Mon Jun 06, 2022 5:29 pm
by answerhappygod
Solve with python in jupyter notebook
Solve With Python In Jupyter Notebook 1
Solve With Python In Jupyter Notebook 1 (53.91 KiB) Viewed 37 times
6. (7 pts). (a) Construct two functions f(xr) and g(x) in the notebook as shown below: ex f(x) = -{2 if x > 0 if x < 0 g(x) = { if x > 0 if x < 0 2+1 (b) Use Matplotlib.pyplot plot function to draw the graphs of f(x) and g(x) on [-4, 4] together within one panel. The graph of f(x) uses blue color with solid line while the graph of g(x) uses red color with dashed line. (c) Use Matplotlib.pyplot figure and axes functions to draw the graphs of f(x) and g(x) on [-4,4] in two different panels. The graph of f(r) uses green color with dashdot line and ylabel f(x) in the upper panel while the graph of g(x) uses black color with dotted line and ylabel g(x) in the lower panel.