In today's blog, we will find the roots to:

(1) x^A = 0, and

(2) x^A + x^B = 0

In the following, let A and B be any constants.

**x^A = 0**

One logical way to approach this is take the logarithm of both sides, which leads to

ln(x^A) = ln 0

However, ln 0 is undefined.

How about a more direct route?

x^A = 0

(x^A)^(1/A) = 0^(1/A)

x = 0^(1/A)

Whether 0^(1/A) has a value depends on the value of A itself. If A>0, then 0^(1/A) = 0.

However, if A = 0, 1/0 is undefined and therefore 0^(1/0) is undefined.

If A<0, then 1/A < 0, -1/A > 0, and

0^(1/A) = 1/(1^(-1/A), which is undefined.

So x^A = 0 has a root only when A>0.

**x^A + x^B = 0**

Let's make two assumptions:

1. A and B are both positive, that is, A>0 and B>0.

2. B > A.

Using assumption 2, let B = A + n. (n = B - A). Then:

x^A + x^B = 0

x^A + x^(A + n) = 0

x^A + x^A * x^n = 0

x^A * (1 + x^n) = 0

This implies that either x^A = 0 or (1 + x^n) = 0

Case 1: x^A = 0.

Since we assumed that A>0, then the root of x^A = 0 is x = 0.

Case 2: 1 + x^n = 0

Then x^n = -1

If n is an integer, then the roots of -1 can be found by the formula:

(-1)^(1/n) = cos((2*k+1)*π/n) + i*sin((2*k+1)*π/n) for k

for k=0,1,2,...,n-1

(Source: Zwillinger, Daniel. CRC Standard Mathematical Tables and Formulae, 32nd Edition. CRC Press, 2012)

The roots to x^A + x^B = 0 with A > 0, B > 0, and B > A are:

x = 0, (-1)^(B - A)

Examples of x^A + x^B = 0

x^2 + x^4 = 0

x^2 + x^4 = 0

x^2 * (1 + x^2) = 0

x^2 = 0, x = 0

1 + x^2 = 0, x^2 = -1, x = i or x = -i. (Where i = √-1)

The roots are x = 0, x = i, and x = -i

x^2 + x^3 = 0

x^2 + x^3 = 0

x^2 * (1 + x) = 0

x^2 = 0, x = 0

1 + x = 0, x = -1

The roots are x = 0 and x = -1.

x^3 + x^5 = 0

x^3 + x^5 = 0

x^3 * (1 + x^2) = 0

Which implies that x^3 = 0 and 1 + x^2 = 0.

The roots are x = 0, x = i, and x = -i

Until next time everyone, good wishes,

Eddie

This blog is property of Edward Shore. 2013

Create an iterator to a string and Use it to cycle through

ReplyDeletec++ string example