Solve ๐ โฒ ( ๐ฅ ) = 0 for z in terms of N, a positive integer
์กฐํ ์: 50 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
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!
๋๊ธ ์: 0
์ฑํ๋ ๋ต๋ณ
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
๋๋ต 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?
์ถ๊ฐ ๋ต๋ณ (1๊ฐ)
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))
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.
๋๊ธ ์: 0
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
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!