It is inherent in the definition of P here that the density, dP/dA, must increase as P increases and therefore dA/dP must decrease. In your proposed solution you have dA/dP increasing as P increases. R. Stafford
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
P = pi/4;
A_correct = 0.7984235067141288;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
2 | Fail |
%%
P = 1/sqrt(11);
A_correct = 0.4964013344766580;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
3 | Fail |
%%
P = exp(-3);
A_correct = 0.1494793760894695;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
4 | Fail |
%%
P = (1/27)^(1/5);
A_correct = 0.6605992894366502;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
5 | Fail |
%%
P = sin(sqrt(2));
A_correct = 0.8634048022602919;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
6 | Fail |
%%
P = 68/137;
A_correct = 0.6471420329484348;
assert(abs(fixedsumarea(P)-A_correct)<100*eps)
Error: Assertion failed.
|
Remove any row in which a NaN appears
6827 Solvers
Remove the small words from a list of words.
672 Solvers
Given two strings, find the maximum overlap
461 Solvers
43 Solvers
584 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!