# How can I plot a curve with a filled sub-domain? [duplicate]

How can I plot a curve with a filled sub-domain as shown below?

• Make two Plots with a different V range, use Filling in one, combine them with Show. What have you tried so far? Did you look at the Plot documentation? – Szabolcs Sep 9 '17 at 14:24
• closely related Q/A: Filling between boundaries – kglr Sep 9 '17 at 17:58

Let f be the function to plot. Define a 2nd function, g that restricts f to the given sub-domain. Use the fill option Filling -> 2 -> Axis.
f[x_] := 1/x^2