Consider this relationship:
7√x - 5√x = 3√x - √x
Determine the total number of real values of x that satisfy the abovementioned relationship.
Same answers as Charlie.
Program below prints out:
By inspection, x=0 and x=1 are solutions
Graphically, Desmos shows a solution near 0.0117.
x ≈ 0.0117154772664753... is per Wolfram Alpha
Using Newton's method, code below, and printing out the results of different starting points yields 3 results:
0
0.011715477266474884
1
The total number of real solutions appears to be 3.
Curiously, a starting point greater than 1 gives a complex number where the Real part is essentially the same as 0.011715477266474884 and the Imaginary part is a tiny negative or positive number, typically:
0.011715477266475333 ± ~3.68 x 10^(-16)i
Failed attempt to solve with algebra.
A substitution can rid us of the fractional exponents:
t = x^(1/210)
t^30 - t^42 - t^70 + t^105 = 0
t^105 - t^70 - t^42 + t^30 = 0 take out a factor of t^30
t^30 * (t^75 - t^40 - t^12 + 1) = 0
but (t-1) is also a factor, so this could be factored as:
(t-1) * t^30 * g(t) but I'm not sure it would help.
I expect g(t) to have one real solution of approx 0.011715477266474884^(1/210) (which is about 0.979) and up to 74 complex solutions, possibly the complex 74th roots of ~0.979 (speculating). I'm not certain if each of these would have an independent complex solution in the x domain.
-------------
def f(x):
return x**(1/7) - x**(1/5) - x**(1/3) + x**(1/2)
def fprime(x):
return 1/(7*x**(6/7)) - 1/(x**(4/5)) - 1/(x**(2/3)) + 1/(x**(1/2))
def newton(first_guess, y_goal=0, epsilon = 10**(-15)):
""" set up functions f(x) and f'(x) """
x_guess = first_guess
y_error = f(x_guess) - y_goal
while abs(y_error) > epsilon:
y_error = f(x_guess) - y_goal
x_guess -= y_error / fprime(x_guess)
return x_guess
###########################################
print(newton(0))
print(newton(.00001))
print(newton(1))
|
Posted by Larry
on 2023-09-01 22:00:19 |