Maqroll

25 Reputation

2 Badges

2 years, 57 days

MaplePrimes Activity


These are questions asked by Maqroll

restart

with(VectorCalculus); SetCoordinates('cartesian[x, y, z]')

with(ScientificConstants)

"with(Units[Simple]):"

``

g := evalf(Constant(g, units))

9.80665*Units:-Unit(m/s^2)

(1)

`#mover(mi("\`v__0\`"),mo("&rarr;"))` := `<,>`(v[0]*Unit('m'/'s'), 0*Unit('m'/'s'), 0*Unit('m'/'s'))

Vector(3, {(1) = v[0]*Units:-Unit(m/s), (2) = 0, (3) = 0})

(2)

`#mover(mi("a"),mo("&rarr;"))` := `<,>`(0*Unit('m'/'s'^2), g, 0*Unit('m'/'s'^2))

Vector(3, {(1) = 0, (2) = 9.80665*Units:-Unit(m/s^2), (3) = 0})

(3)

int(`#mover(mi("a"),mo("&rarr;"))`, t)

Vector(3, {(1) = 0, (2) = 9.80665*t*Units:-Unit(m/s^2), (3) = 0})

(4)

As you can see in (4) units are wrong. I have tried to insert them in int expression but nothing has work. Moreover using Units[Standard] packecge i get

Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to indefinite integration.

Thanks

Download Units_and_Integrals.mw

First Question

 

Let's define a function:

f := proc (x) options operator, arrow; a*x/(4*x^2+b) end proc

proc (x) options operator, arrow; a*x/(4*x^2+b) end proc

(1.1)

now define a new function that is the derivative of f.

g := proc (x) options operator, arrow; diff(f(x), x) end proc

proc (x) options operator, arrow; diff(f(x), x) end proc

(1.2)

g is not what I expected. I expect:

g := proc (x) options operator, arrow; a/(4*x^2+b)-8*a*x^2/(4*x^2+b)^2 end proc

NULL

and if i try to calculate g(0), the result is:

g(0)

Error, (in g) invalid input: diff received 0, which is not valid for its 2nd argument

 

NULL

instead of

a/b

a/b

(1.3)

Second Question

 

I need to define an integral function in which the variable is an integration boundary:

 

h := proc (x) options operator, arrow; int(f(t), t = 0 .. x) end proc

proc (x) options operator, arrow; int(f(t), t = 0 .. x) end proc

(2.1)

if I try to calculate :

h(x)

int(a*t/(4*t^2+b), t = 0 .. x)

(2.2)

how can i do the calculation and display the explicit form of the function, and assign to a name ?

  (1/8)*a*ln(4*x^2+b)-(1/8)*a*ln(b)

(1/8)*a*ln(4*x^2+b)-(1/8)*ln(b)*a

(2.3)

Third Question

 

is there a way to write a system of equation in text mode (or math) in the usual math notation with a big curly bracket followed by the list of equation ? graphically similar to the piecewice operator that seems to be not useful for this purpose?

About the first and the second question i read on the web something but i don't understand deeply what is the reason of the behaviour. I would like to understand really that. Thanks a lot.

Download Questions.mw

Looking for the solution of this a non linear system y = x^2 + 2*x - 3 ,  y = x^3 + 3*x^2 - 4*x - 8 (The system has 3 real solutions A = (-3.35, 1.51)    B = (-0.72, -3.92)  C = (2.07, 5.42) ).

i have tried to solve it as follows:

eq1 := x^2 + 2*x - 3

eq2 := x^3 + 3*x^2 - 4*x - 8

fsolve({eq1 = eq2})

I get 

   {x = -3.346462190}, {x = -0.7222456338}, {x = 2.068707823}

That is what i expected.
 

But if i try to use solve and then evalf i find three complex solutions.

solution := solve({eq1 = eq2}, explicit)

evalf(%);
      
  { x = 2.068707824 - 4x10^(-10)   I },     { x = -3.346462190 - 7.660254040 x10^(-10)    I },   { x = -0.722245634 + 9.660254040x10^(-10)    I }
    

Why ? I don't understand.

Moreover, solving the equations as follows:
sys1 := y = x^2 + 2*x - 3;
sys2 := y = x^3 + 3*x^2 - 4*x - 8;

fsolve({sys1, sys2}, {x, y})

yeld just one solution:

               {x = 2.068707823, y = 5.416967705}

Someone can explain me this behaviour ?

Page 1 of 1