how to solve this differential equation

1 次查看(过去 30 天)
I want to solve the equation iteratively for rcfv. I have the value of gama = 1.399 and beta = 0.675. How can I solve this equation to get the value of rcfv.

采纳的回答

Star Strider
Star Strider 2016-6-10
This will get you two real values for ‘r_CFV’:
gama = 1.399;
beta = 0.675;
f = @(rcfv) rcfv.^(1-gama)/gama + ((gama-1)/2)*beta.^4 * rcfv.^(2/gama) - (gama+1)/2;
r_cfv(1) = fzero(f, 1)
r_cfv(2) = fzero(f, 10)
x = linspace(-20, 20);
figure(1)
plot(x, f(x))
grid
Use the Optimization Toolbox fsolve function with real and complex initial estimates to get complex values. Another option is the Symbolic Math Toolbox solve function.
  2 个评论
sri satya ravi
sri satya ravi 2016-6-10
@(rcfv) rcfv.^(1-gama)/gama + ((gama-1)/2)*beta.^4 * rcfv.^(2/gama) - (gama+1)/2; .. Can I know what @(rcfv) at the starting of the equation do. and also can you please explain r_cfv(1) = fzero(f, 1) this equation.
Star Strider
Star Strider 2016-6-10
I created an anonymous function (see the section on Anonymous Functions in Function Basics) from your equation. The ‘@(rcfv)’ creates a function handle.
Since I expressed your equation as an implicit function, I used the fzero function to find both real roots (there appear to be only two when I plotted your function) at:
r_cfv =
277.0523e-003 8.5921e+000
As I mentioned in my original Answer, there may be complex roots as well that you would have to use the Optimization Toolbox fsolve function or the Symbolic Math Toolbox solve function to find. (When I tried it with the Symbolic Math Toolbox, it only returned the one real solution at 8.5921.)

请先登录,再进行评论。

更多回答(1 个)

adi kul
adi kul 2016-6-10
Why iteratively when you have only 1 unknown variable?

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by