how to solve this equation (vdmoins/2)*(1-cos((x + alpha)*(2 * pi)/360)) + (vpiston/2​)*(1+cos((​x)*(2 * pi)/360))==291

1 view (last 30 days)
vdmoins = 537;
alpha = 45;
vpiston = 426;
conditions 0 < x < 360 ;
(vdmoins/2)*(1-cos((x + alpha)*(2 * pi)/360)) + (vpiston/2)*(1+cos((x)*(2 * pi)/360))== 291

Answers (1)

John D'Errico
John D'Errico on 30 Sep 2018

First, check that a root exists.

vdmoins = 537;
alpha = 45;
vpiston = 426;
fun = @(x) (vdmoins/2)*(1-cos((x + alpha)*(2 * pi)/360)) + (vpiston/2)*(1+cos((x)*(2 * pi)/360)) - 291
ezplot(fun,[0,360])
grid on

If you zoom in, you will see there are in fact two roots near x=250.

Solve found them, although they were negative.

syms x
x = solve((vdmoins/2)*(1-cos((x + alpha)*(2 * pi)/360)) + (vpiston/2)*(1+cos((x)*(2 * pi)/360))== 291,x)
x =
 -(log(-(2*(2^(1/2)*(12709*2^(1/2) - 18038)^(1/2) - 127))/(- 284 + 2^(1/2)*(179 + 179i)))*180i)/pi
  -(log((2*(2^(1/2)*(12709*2^(1/2) - 18038)^(1/2) + 127))/(- 284 + 2^(1/2)*(179 + 179i)))*180i)/pi

But, recognizing this function is periodic, with period 360, we can simply add 360 to get them into the domain of interest.

vpa(x)
ans =
  -102.0701941443144389362929090116
 -91.828818306949231130334279176076
vpa(x) + 360
ans =
  257.9298058556855610637070909884
 268.17118169305076886966572082392
  2 Comments
Thomas Ruest
Thomas Ruest on 30 Sep 2018
Hi John, thanks for ur response. Im looking for the minimal value (x,y) of this function. Im getting 2 value but I just want the minimal one. Sorry for my bad english Im french.
y = (vdmoins/2)*(1-cos((x + alpha)*(2 * pi)/360)) + (vpiston/2)*(1+cos((x)*(2 * pi)/360)

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!