Create new...

You have no components! Add one above or get inspired from an idea.

Here's your generated equation:

Note: Some graphing utilities may not be able to display the graph. Here's why.

Return to top

How does it work?

This equation generation is mainly split into two parts: graph combination and domain restriction.

Let's first discuss graph combination. Say you want to combine the graphs of a line and a circle:

\[y=x+1\]

\[x^2+y^2=9\]

While you could write out the equations separately pretty easily, we have to use the Zero-Product Property to combine these equations into one. The property basically states that the product of two or more expressions equals 0 if and only if at least one of the expressions equals 0.

\[ ab = 0 \; if \; a=0 \; or \; b=0 \]

We can take advantage of this fact to make it so that if a given point on the graph satisfies either equation, it will satisfy the combined equation as well! First we have to move all the terms to one side.

\[y=x+1 \longrightarrow y-x-1=0\]

\[x^2+y^2=9 \longrightarrow x^2+y^2-9=0\]

These new equations are equivalent to the previous ones, but if they are multiplied together, either equation equaling 0 will cause the entire product to equal 0. Success! We have combined the equations into one such that the solutions of either equation won't interfere with the other!

\[\left( y-x-1 \right) \left( x^2 + y^2 -9 \right) = 0 \]

Second is domain restriction. This allows us to cut off a graph so it doesn't extend all the way to infinity. Let's say we wanted to graph a line but restrict it to between -3 and 3:

\[ y = {1 \over 2}x + 2 \]

Start with an absolute value function.

\[ y = \left| x \right| \]

Divide by x. The negative numbers will become -1; the positives, 1. For the purposes of this, don't worry about the discontinuity at x=0.

\[ y = { \left| x \right| \over x } \]

Finally take the square root. The -1s will be shot into the complex plane (the square root of negative numbers are not defined as real numbers), and the 1s will remain exactly the same. Voila! Only the inputs greater than 0 will now be graphed!

\[ y = \sqrt{ \left| x \right| \over x } \]

This base domain restriction graph can be translated, reversed, and combined.

\[ y = \sqrt{ \left| x-2 \right| \over x-2 } \]

\[ y = \sqrt{ \left| 2-x \right| \over 2-x } \]

\[ y = \sqrt{ \left| (x+1)(2-x) \right| \over (x+1)(2-x) } \]

Bringing it back to the original problem, you can have this domain restriction apply to any graph by multiplying the graph with this domain restriction expression (along with any modifications). The parts of the function in the domain of the domain restriction expression will simply be multiplied by one, but were the domain is undefined, the graph will be gone!

\[ y = {1 \over 2}x + 2 \]

\[ y = {1 \over 2}x + 2 \sqrt{ \left| (x+3)(3-x) \right| \over (x+3)(3-x) } \]

We don't even have to restrict just x. We can place any expression in the place of x in the restriction and come up with much more complicated graphs. We can even rewrite our solution to the above graph more compactly!

\[ x^2 + y^2 = 16 \sqrt{ \left| -(y-(4-x)) \right| \over -(y-(4-x)) } \]

\[ y = {1 \over 2}x + 2 \sqrt{ \left| 3-|x| \right| \over 3-|x| } \]

Now, armed with the tools of graph combination and domain restriction, if you can graph it, you can make an equation for it. Whether it be line art so intricate it deserves a place in the Louvre or a secret message encoded in an equation, the bounds for your creativity are limitless!

Here's the reason why some graphing utilities can't graph this properly. The domain is restricted by making parts of the graph map to complex numbers, and the graphs are combined with the zero-product property. This is theoretically fine, but if one factor is a complex number but another is 0, a graphing utility may tret it as just an error rather than what it should multiply to: 0. As a result, any component's domain restriction will apply to the entire graph rather than just its component.

Thank you for your time.

\[ \left( (|x|-2)^2 + (y-2)^2 - 1 \right) \left( y - {x^4 \over 27} + 3 \sqrt{ \left| -(y+1) \right| \over -(y+1) } \right) = 0 \]

This project was inspired by The Batman Equation! Check it out!

Equations rendered with MathJax and LaTeX. Graphs rendered with SVG. Color choosers created using jscolor.

Return to top