Wanna find x that maximize a function including symbolic variables

조회 수: 12 (최근 30일)
嵩人 藤森
嵩人 藤森 2021년 5월 20일
댓글: 嵩人 藤森 2021년 5월 22일
Hello,
I wanna find x that maximize the following unction including symbolic variables. Please teach me how to do so.
K,m,T,D >0
-------------------------------------------------------------------------
syms K,m,T,D,x
f(x)=sqrt(1/( (K-(m+T*D)*x^2)^2 + x^2*(D+T*K-T*m*x^2)^2))
------------------------------------------------------------------------------
Best regards
  댓글 수: 2
Torsten
Torsten 2021년 5월 20일
편집: Torsten 2021년 5월 20일
Set the denominator to zero and use Matlab's "solve" to solve for x^2.
If you don't get x real-valued, differentiate the denominator with respect to x, set the derivative to zero and again use Matlab's "solve" to solve for x.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2021년 5월 20일
syms K m T D x
f(x)=sqrt(1/( (K-(m+T*D)*x^2)^2 + x^2*(D+T*K-T*m*x^2)^2)) ;
df = diff(f,x)
df(x) = 
s = solve(df,x)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
s = 

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by