Ask Your Question

Ricky's profile - activity

2020-06-18 20:52:16 +0200 received badge  Popular Question (source)
2015-03-02 12:27:14 +0200 received badge  Student (source)
2015-03-01 01:46:48 +0200 commented answer dividing vector(a,b) by sqrt(x) gives (a/x*sqrt(x),b/x*sqrt(x))

Good on sage for not leaving radicals in the denominator.

2015-03-01 01:44:14 +0200 received badge  Scholar (source)
2015-03-01 01:44:13 +0200 commented answer dividing vector(a,b) by sqrt(x) gives (a/x*sqrt(x),b/x*sqrt(x))

Thank you very much for your response.

2015-03-01 01:34:07 +0200 received badge  Editor (source)
2015-03-01 00:27:40 +0200 asked a question dividing vector(a,b) by sqrt(x) gives (a/x*sqrt(x),b/x*sqrt(x))

I can't seem to figure out why the behavior above is happening.

I have been trying to familiarize myself with Sage as I am both an IT person at my university and currently a Calc III student and it would seem to me to be helpful for both to know how this software works since many professors use it and I can use it to check work in my classes.

When I attempt to get the unit vector in the direction of <1,1> I divide the vector by its magnitude, and instead of the expected result of <1/sqrt(2), 1/sqrt(2)> I have been getting <1/2*sqrt(2), 1/2*sqrt(2)> and this happens the same way with a vector divided by the sqrt of anything. (i.e. <1,1> / sqrt(3) == <1/3*sqrt(3), 1/3*sqrt(3)>)

Is this a bug, or am I missing something?

EDIT - To clarify, I am dividing a vector by it's magnitude, which is a scalar number. vector{a,b} divded by c should yield vector{a/c, b/c}. This works fine for integers. but when doing so with the sqrt() function it produces odd results. So if c == sqrt(d) the answer is coming back as vector{a/(dc), b/(dc)} and I don't understand why the denominator is being multiplied by d.