Solve ๐‘” โ€ฒ ( ๐‘ฅ ) = 0 for z in terms of N, a positive integer

์กฐํšŒ ์ˆ˜: 50 (์ตœ๊ทผ 30์ผ)
Fatima Majeed
Fatima Majeed 2024๋…„ 11์›” 19์ผ 21:08
๋‹ต๋ณ€: Walter Roberson ๋Œ€๋žต 22์‹œ๊ฐ„ ์ „
I need help solving for z in terms of N, where . The function is:
where N is a positive integer. I computed the derivative :
Setting , I simplified the equation as:
where
# Goal:
I want to find a general expression for z in terms of N, such as , or understand how z depends on N.
# Questions:
1. How can I solve this cubic equation in MATLAB symbolically for z in terms of N ?
2. Is there a straightforward way to determine if is decreasing for general N ?
Thank you for your help!

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

John D'Errico
John D'Errico 2024๋…„ 11์›” 19์ผ 23:00
ํŽธ์ง‘: John D'Errico 2024๋…„ 11์›” 20์ผ 0:06
First, it is not a cubic equation!
Yes, you can replace sqrt(x) with a new variable z, thus a transformation. But doing so can sometimes introduce spurious or false solutions. For example, if a negative value for z is one of the solutions, then it is not a solution to your problem, but it may be a solution to the transformed problem in z. You will generally need to test to see if what you find really is a solution to the original problem.
You already have the problem in the form of a cubic polynomial in z.
Can you write down the general solution to a cubic polynomial in terms of the coefficisnts? Yes. This has been known for longer than any of us have been alive.
Just apply solve to the result. Note that it will be a mess, with imaginary terms in it. And depending on the value of N, you will have exactly 1 or 3 real solutions.
syms z N
EQ = 2*N*sqrt(2*sym(pi))*z^3 + 4*N*sqrt(2*sym(pi))*z^2 - 4
zsol = solve(EQ,maxdegree = 3)
zsol =
4/(9*(((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)) + (((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3) - 2/3
- 2/(9*(((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)) - (((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)/2 - (3^(1/2)*(4/(9*(((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)) - (((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3))*1i)/2 - 2/3
- 2/(9*(((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)) - (((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)/2 + (3^(1/2)*(4/(9*(((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3)) - (((2^(1/2)/(2*N*pi^(1/2)) - 8/27)^2 - 64/729)^(1/2) + 2^(1/2)/(2*N*pi^(1/2)) - 8/27)^(1/3))*1i)/2 - 2/3
And again, it will depend on the value of N what will happen.
  ๋Œ“๊ธ€ ์ˆ˜: 3
John D'Errico
John D'Errico ๋Œ€๋žต 23์‹œ๊ฐ„ ์ „
ํŽธ์ง‘: John D'Errico ๋Œ€๋žต 23์‹œ๊ฐ„ ์ „
I'm sorry, but I don't do homework, and this is sounding far too much like homework now. Next, please don't ask completely new questions as a comment to an old question.
Can you identify where the two functions are equal? (Hint: subtract them, and find where the difference is zero. What tool will locate that point? Hint #2, use fzero.)
Make sure you locate multiple locations where they cross, if that happens. Plotting the difference function can help you learn if there are multiple such intersections.
Once you know where the functions cross, can you simply test to see which is larger in the intervals between the crossing points?
Fatima Majeed
Fatima Majeed ๋Œ€๋žต 22์‹œ๊ฐ„ ์ „
Thank you for the response! I understand your concern, but Iโ€™d like to clarify that this is not homeworkโ€”itโ€™s purely for my learning and exploration. Iโ€™m trying to determine the best method to compare these functions.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (1๊ฐœ)

Walter Roberson
Walter Roberson ๋Œ€๋žต 22์‹œ๊ฐ„ ์ „
Let's try...
Q = @(v) sym(v);
syms f(x) g(x) G(z)
syms z positive
syms N integer
assumeAlso(N, 'positive');
g(x) = 4*N*sqrt(2/(Q(pi)*x)) + 2*x*N + 4/sqrt(2*x*Q(pi))
G(z) = subs(g, x, z^2)
f(x) = 2*(N+1)*log(1/x)
D = f(x) - g(x)
D10 = subs(D, N, (1:100).');
sol=arrayfun(@(X)vpasolve(X,[0 inf]), D10, 'uniform', 0);
find(~cellfun(@isempty, sol))
ans = 0x1 empty double column vector
So in the range N = 1 to N = 100, there are no cases where f(x) and g(x) cross-over for non-negative x.
If we can generalize to larger N, then the implication would be that either f(x) is always larger or else g(x) is always larger.

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Startup and Shutdown์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by