Solving a integral with a unknown value with known limits

Hello guys,
I am trying the solve the following equations in matlab to find Bg. All other variables are known.

답변 (2개)

Walter Roberson
Walter Roberson 2020년 6월 15일
The below is Maple notation, easily change to MATLAB notation with the Symbolic Toolbox
simplify([solve](LHS = 2*B*int(-B^2*((1 - xi)^2 - 2*(1 - rho__v/rho__1)*xi - 1), xi = 0 .. 1), B));
[ (1/3)
[ (1/3) / 2\
[12 \LHS rho__1 (5 rho__1 - 3 rho__v) /
[------------------------------------------------,
[ 10 rho__1 - 6 rho__v
(1/3)
(1/3) / 2\ / (1/2) \
12 \LHS rho__1 (5 rho__1 - 3 rho__v) / \I 3 - 1/
---------------------------------------------------------------, -
20 rho__1 - 12 rho__v
(1/3)
(1/3) / 2\ / (1/2) \
12 \LHS rho__1 (5 rho__1 - 3 rho__v) / \I 3 + 1/
---------------------------------------------------------------
20 rho__1 - 12 rho__v
]
]
]
]
]
The first is certain to be real-valued if the coefficients are real-valued. The other two might be real-valued for particular combinations of values, if you use the definition that x^(1/3) is exp(log(x)/3) and x is negative, then the complex part can vanish.

댓글 수: 5

Okay I will test this out to see if it will work.
Thanks for the quick reply.
Apologies I do not have access to symbolic toolbox. Is there a way to convert this to matlab code more easily?
You can use the results:
[ 12^(1/3)*(LHS*rho__1*(5*rho__1-3*rho__v)^2)^(1/3)/(10*rho__1-6*rho__v), ...
12^(1/3)*(LHS*rho__1*(5*rho__1-3*rho__v)^2)^(1/3)*(1i*3^(1/2)-1)/(20*rho__1-12*rho__v), ...
-12^(1/3)*(LHS*rho__1*(5*rho__1-3*rho__v)^2)^(1/3)*(1i*3^(1/2)+1)/(20*rho__1-12*rho__v) ]
where LHS is the expression that appears to the left of your =
What is "i" refering to?

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

Steven Lord
Steven Lord 2020년 6월 15일

0 개 추천

Subtract the left side of your equation from both sides to give an equation of the form 0 = someFunctionOf(B_g). Then use fzero to find a root of someFunctionOf.

댓글 수: 2

Will the integral and exponential term work with someFunctionOf?
Inside the someFunctionOf function you write you can certainly call exp and integral.

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

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

질문:

2020년 6월 15일

댓글:

2020년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by