"defined by" or "defined as"?

Solution 1:

I would agree with the use of "by" in both your examples, but if I were writing something like the following examples I would use "as":

The value of x is defined as equal to the sum a + b
In this example, x is defined as equivalent to ...

So:

... defined by [a formula]
... defined as [a value]