To plot arctan in Maple, use the plot command with the inverse tangent function, written as arctan(x) — for example, plot(arctan(x), x = -10 .. 10). That single call draws the principal branch on the default range, and the result is the familiar S-shaped curve that flattens toward −π/2 on the left and π/2 on the right. The key condition to know up front: Maple's arctan is the two-argument-capable inverse tangent, and its single-argument form returns values in the open interval (−π/2, π/2), so the plot never touches the horizontal asymptotes. Everything else — restricted domains, added asymptote lines, legends, or 3D surfaces — is a variation on that same call with extra options.
This guide covers the exact syntax, the range-versus-view distinction that trips up many users, how to control the vertical scale, how to combine arctan with other curves, and how to read the plot correctly. The steps assume a reasonably current Maple release (the 2020s versions behave the same way here); if your version differs, check the plot help page with ?plot.
The basic call and what Maple returns
The function name in Maple is arctan, not atan and not tan^-1. If you type atan(x), Maple will generally return an unevaluated or unrecognized name rather than the inverse tangent, so the spelling matters.
A minimal working command is:
Maple evaluates arctan numerically across the plotting range, samples points adaptively, connects them, and renders a 2D plot in the worksheet or document. You don't need to load a package first — plot is in the core. You also don't need to declare x; the second argument both names the variable and sets the range.
A useful success check: the curve should pass through the origin (arctan(0) = 0), rise with a slope of 1 at x = 0 (since the derivative of arctan at zero is 1), and level off. If your plot is a straight line or throws a syntax error, the usual culprits are a misspelled function, a missing range, or a variable name mismatch between the expression and the range.
Range versus view: the distinction that controls the picture
In plot(arctan(x), x = -10 .. 10), the x = -10 .. 10 part is the domain over which Maple samples the function, not merely the visible window. This matters because sampling and display are separate concerns, and conflating them causes two common problems.
First, if you sample a very wide range (say −1000 to 1000), most of the interesting curvature near the origin gets compressed into a few pixels, and the plot looks like two flat shelves joined by a near-vertical jump. Second, if you restrict the domain to a narrow interval but want to see the asymptotic behavior, you can't — the function simply isn't evaluated outside what you specified.
For arctan specifically, a domain of roughly −10 to 10 usually balances the central curvature against the flattening tails. If you want a closer look at the bend near the origin, use something like x = -3 .. 3. To control the visible height independently, add a y range as a separate option rather than as part of the domain:
Here the y = -2 .. 2 is a view constraint on the vertical axis. Because arctan stays strictly between −1.571 and 1.571 (that's ±π/2 to three decimals), a y-view of −2 to 2 gives comfortable headroom above and below the asymptotes. Setting the y-view tighter than ±π/2 will clip the curve, which is sometimes exactly what you want to emphasize the plateau, but it can also mislead a reader into thinking the function reaches a hard ceiling. Label or annotate accordingly.
Getting the asymptotes and key values right
The horizontal asymptotes sit at y = π/2 ≈ 1.5708 and y = −π/2 ≈ −1.5708. Maple won't draw them for you, so if the plot's purpose is to show limiting behavior, add them as separate curves with the plot command's list syntax:
Two details make this work. Use Pi (capital P), which is Maple's constant for π; lowercase pi is just a symbol and won't evaluate to 3.14159. And when you pass a list of expressions, the color and linestyle lists apply in order, so the arctan curve stays solid black while the two asymptotes are dashed gray. If the lists are shorter than the expression list, Maple recycles them, which can produce confusing colors — match the lengths.
A worked sanity check you can do by hand: arctan(1) = π/4 ≈ 0.785, and arctan(−1) = −0.785. On a plot from −10 to 10, the curve should cross y ≈ 0.785 at x = 1 and y ≈ −0.785 at x = −1. If your curve doesn't hit those points, something in the expression or range is wrong. This is a more reliable check than eyeballing the asymptotes, which are approached but never reached.
Making the plot readable: labels, legend, and aspect ratio
A bare plot is fine for a quick look, but a publishable figure needs labels. Maple accepts labels, title, legend, and labeldirections as options:
The legend option only displays when you plot a list of expressions (or set legendstyle), so if the legend doesn't appear with a single expression, wrap the expression in brackets: plot([arctan(x)], ...). That's a small quirk worth remembering, because a silently missing legend is easy to misread as a rendering bug.
Aspect ratio deserves a thought. The default scaling stretches the plot to fill the region, which can exaggerate or flatten the slope near the origin. For a mathematically honest picture of a function whose natural vertical extent is about π ≈ 3.14, scaling = constrained forces equal units on both axes:
With constrained scaling, the horizontal asymptotes at ±1.5708 sit at their true visual distance from the x-axis, and the slope of 1 at the origin looks like a genuine 45-degree line. Without it, the picture is still correct but the geometry is distorted.
Restricting the domain and plotting in degrees
Sometimes you want arctan over a specific interval, such as the region where it's nearly linear. A domain like x = -0.5 .. 0.5 zooms into that near-linear zone, where arctan(x) ≈ x to good approximation (at x = 0.5, arctan is about 0.4636 versus 0.5, roughly a 7% difference). Plotting both arctan(x) and x together makes that small-angle equivalence visually obvious:
If your application works in degrees rather than radians, convert the output with arctan(x)*180/Pi and adjust the y-view to about −90 to 90:
The shape is identical; only the vertical scale changes. State the unit in the axis label, because a reader who assumes radians will misread a degrees plot by a factor of about 57.
Combining arctan with other functions
Maple plots lists of expressions on shared axes, which is the simplest way to compare arctan against related curves. A common comparison is arctan against the identity and against a rational approximation. For instance, arctan(x) ≈ x/(1 + 0.28x²) is a crude but serviceable approximation on moderate ranges; plotting both shows where it drifts. Another instructive pairing is arctan(x) and Pi/2 - arctan(1/x) for positive x, which are equal — a reflection of the identity arctan(x) + arctan(1/x) = π/2 for x > 0. A plot of their difference should be flat at zero (up to numerical noise), which makes a nice verification exercise.
When combining curves with very different scales, consider plot with a secondary axis via the useunits or axis options, or simply split into two plots. Overlaying arctan (bounded by ±1.57) with, say, exp(x) (which explodes) on the same linear axes will squash arctan into a flat line — a scale mismatch, not a mathematical one.
For piecewise or conditional variants, you can also plot arctan composed with other functions, such as arctan(sin(x)), which produces a wavy curve bounded by ±π/4. These compositions are where plotting arctan becomes genuinely useful for intuition: seeing how the saturating inverse tangent reshapes a periodic input is hard to grasp from the formula alone.
Plotting arctan in three dimensions and with parameters
Maple's plot3d handles two-variable versions. The surface z = arctan(x*y) or z = arctan(y/x) (the latter connected to polar angle) can be rendered with:
The arctan(y/x) surface is worth a caution: it's discontinuous across the line x = 0 because single-argument arctan returns values in (−π/2, π/2), so the surface jumps from near −π/2 to near π/2 as x changes sign. Maple will draw a steep wall there, which can look like a rendering artifact but is actually the branch cut. The two-argument form arctan(y, x) (Maple supports this signature) returns the angle in the correct quadrant over (−π, π], removing the jump — but note the argument order: arctan(y, x), y first. Getting that order backwards rotates the result by 90 degrees and is a frequent source of wrong plots.
If you're exploring a family of curves, say aarctan(bx) for various a and b, the animate command in the plots package steps a parameter and produces an animation:
This requires loading the plots package first, which is why with(plots) appears above. The animation makes clear that the parameter scales the height while leaving the horizontal asymptote structure's shape intact (the asymptotes move to ±aπ/2).
Common errors and how to diagnose them
Several failure modes recur. A syntax error usually means a missing range or a stray bracket. An empty plot often means the expression evaluated to something non-numeric over the whole domain — check that you wrote arctan and not a user-defined name that shadows it. A plot that looks like a vertical line at the origin suggests the sampling domain was so wide that all curvature collapsed; narrow it. A legend that won't show usually means a single expression instead of a list.
If the plot renders but looks wrong, verify three values by hand: arctan(0) = 0, arctan(1) ≈ 0.785, and the asymptote at ≈1.571. If those three check out, the plot is almost certainly correct and any oddity is a scaling or view issue rather than a mathematical one. If Maple returns an error mentioning "cannot evaluate," the function name is likely misspelled or the variable in the expression doesn't match the variable in the range.
One version note: across recent Maple releases the plot calling conventions for these cases are stable, but option names occasionally gain aliases or deprecations. If an option like labeldirections is rejected, consult ?plot,options in your installed version rather than assuming the syntax above applies unchanged.
Reading the result and knowing when you're done
A correct arctan plot has four signatures: it passes through the origin; it's odd-symmetric about the origin (arctan(−x) = −arctan(x)); its slope at zero is 1; and it approaches but never crosses ±π/2. Verify the symmetry by plotting from −a to a and checking the curve looks like a 180-degree rotation of itself. Verify the slope by comparing against the line y = x near the origin, as in the earlier small-angle plot.
You're done when the figure communicates the limiting behavior and the central curvature without misleading scale distortion. If the reader can tell where the curve steepens, where it flattens, and what the asymptotes are, the plot has done its job. For most purposes that means a domain of about −10 to 10, a y-view slightly wider than ±π/2, labeled axes, and — if the asymptotes matter to your point — two dashed reference lines at ±π/2. Beyond that, extra options mostly add polish rather than information.
If you later need the numeric values behind the curve, evalf(arctan(1)) returns 0.7853981634, and evalf(Pi/2) returns 1.570796327, which lets you annotate the plot with exact coordinates rather than eyeballed ones — a small step that separates a sketch from a figure you can defend.