Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. Reduce[x^2 + y^2 == 5 && y >= 0, x]
  2.  
  3. Last[Solve[x^2 + y^2 == 5, y]] /. Rule -> Set
  4.  
  5. Plot[y, {x, -Sqrt[5], Sqrt[5]}, AxesLabel -> {"X", "Y"},
  6. PlotLegends -> {"!(*FormBox[SqrtBox[(5 - *SuperscriptBox[(x),
  7. (2)])],
  8. TraditionalForm])"}]
  9.  
  10. velocidades = D[y, x]
  11.  
  12. Plot[velocidades, {x, -Sqrt[5], Sqrt[5]}, AxesLabel -> {"X", "Y"},
  13. PlotLegends -> {"!(*FormBox[(-*FractionBox[(x), SqrtBox[(5 -
  14. *SuperscriptBox[(x), (2)])]]),
  15. TraditionalForm])"}]
  16.  
  17. xVelocidade = Range[0.01, Sqrt[5], 0.01];
  18.  
  19. yVelocidade = velocidades /. x -> # & /@ xVelocidade // N
  20.  
  21. listVelocidades = Transpose[{xVelocidade, yVelocidade}]
  22.  
  23. proporção = Abs[yVelocidade/xVelocidade];
  24.  
  25. Nearest[proporção, 2]
  26.  
  27. Position[proporção, First[%]]
  28.  
  29. velXvelY =
  30. Extract[listVelocidades,
  31. Position[proporção, First[Nearest[proporção, 2]]]]
  32.  
  33. test = velXvelY[[1, 2]]/velXvelY[[1, 1]] // Abs
  34.  
  35. sol[x_] := Solve[x^2 + y^2 == 5, y];
  36. Y[x_] := y /. Last[sol[x]]
  37. Plot[Y[x], {x, -Sqrt[5], Sqrt[5]}]
  38. velocidades[x_] := D[Y[x], x]
  39. Plot[Evaluate[velocidades[x]], {x, -Sqrt[5], Sqrt[5]}]
  40.  
  41. Solve[Abs[velocidades[x]] == 2 && -Sqrt[5] < x < Sqrt[5]]
  42. (* {{x -> -2}, {x -> 2}} *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement