1
$\begingroup$

I have attached the equation

f[β_, α_] = Piecewise[
  {{-2*α*β + (2*β^2 + 2* α^2)* ArcTan[α/β] - Pi, β >= 0 && α >= 0}, 
  {(-1*5)*(α*β) + (β^2/2 + α^2)* ArcTan[(2* α)/β] - Pi, β <= 0 && α >= 0}}
 ] 

Can someone help to get the plot for the following closed equation. I Have Tried to solve this using piecewise but not Able to figure right plot.I obtained plot in 3D,Contourplot and Manipulate

$\endgroup$
  • $\begingroup$ Please provide a copyable code with your Piecewise implementation. $\endgroup$ – Kuba Aug 21 '18 at 11:32
  • $\begingroup$ f[[Beta]_, [Alpha]_] = Piecewise[{{-2*[Alpha]*[Beta] + (2*[Beta]^2 + 2*[Alpha]^2)* ArcTan[[Alpha]/[Beta]] - Pi, [Beta] >= 0 && [Alpha] >= 0}, {(-1*5)*([Alpha]*[Beta]) + ([Beta]^2/2 + [Alpha]^2)* ArcTan[(2*[Alpha])/[Beta]] - Pi, [Beta] <= 0 && [Alpha] >= 0}}] $\endgroup$ – Sukka Aug 21 '18 at 11:48
  • $\begingroup$ Please make an edit to your question instead of adding comments. $\endgroup$ – Kuba Aug 21 '18 at 11:53
  • $\begingroup$ is there anything written wrong $\endgroup$ – Sukka Aug 21 '18 at 11:56
  • $\begingroup$ ContourPlot[f[x, y], {x, -4, 4}, {y, -4, 4}, Contours -> {0}, ContourShading -> None]? $\endgroup$ – march Aug 21 '18 at 21:22
2
$\begingroup$
f[b_, a_] = 
 Piecewise[{{-2*a*b + (2*b^2 + 2*a^2)*ArcTan[a/b] - Pi, 
    b >= 0}, {-5*a*b + (b^2/2 + a^2)*ArcTan[2*a/b] - Pi, b < 0}}]

Plot3D[f[a, b], {a, 0, 10}, {b, -5, 5}, Mesh -> None, 
 ColorFunction -> Hue, PlotRange -> All, 
 AxesLabel -> {"\[Alpha]", "\[Beta]", ""}]

fig1

$\endgroup$
  • $\begingroup$ Thank you, but can you make it as a simple 2D plot $\endgroup$ – Sukka Aug 24 '18 at 5:38
  • $\begingroup$ What do you mean by 2D - ContourPlot[]? $\endgroup$ – Alex Trounev Aug 24 '18 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.