1

2d graph. Powers of a variable.

##### Title

##### Question

Why do these two programs give me different outputs even though they are the same? The second one gives me a wrong graph.

x=[-5:0.01:5] a=4 y1=sqrt(a^(2/3)-(x^2)^(1/3))^3 y2=-sqrt(a^(2/3)-(x^2)^(1/3))^3 plot2d(x,y1) plot2d(x,y2)

x=[-5:0.01:5] a=4 y1=sqrt(a^(2/3)-(x^(2/3)))^3 y2=-sqrt(a^(2/3)-(x^(2/3)))^3 plot2d(x,y1) plot2d(x,y2)

Scilab

__Answers:__

0

Hi Abbas, following code will clear your doubt

(-8)^(2/3) (-8^2)^(1/3) (-8^1/3)^2

Oh I get it. I don't even need to run those inputs to understand my mistake, how can I be so foolhardy. Thank you :)

18-12-17, 8:50 p.m.AbbasYour welcome :-)

18-12-17, 9 p.m.ashutumhoLogin to add comment