## 10 Reputation

1 years, 249 days

## Solving equation with units problem...

Maple 2020

Hi,

What am I doing wrong? Seems like some unit compatibility problem when tryaing to solve simple task with momentum conservation rule...

with(Units);

m__2 := 0.400*Unit('kg');
m__1 := 0.300*Unit('kg');
x__w := 0.700*Unit('m');

v__2p := 0.000;

v__1p := 2*Unit(('m')/('s'));

m__1*v__1p + m__2*v__2p = m__1*v__1k + m__2*v__2k;
/s\
0.6 = (0.3 v__1k + 0.4 v__2k) Unit|-|
\m/

subs(v__2p = 0, 0.600 = (0.300*v__1k + 0.400*v__2k)*Units[Unit](s/m));
/s\
0.6 = (0.3 v__1k + 0.4 v__2k) Unit|-|
\m/

v__1k := solve(0.600 = (0.300*v__1k + 0.400*v__2k)*Units[Unit](s/m), v__1k);
/m\
v__1k := (-1.333333333 v__2k + 2.) Unit|-|
\s/

1/2*m__1*v__1p^2 + 1/2*m__2*v__2p^2 = 1/2*m__1*v__1k^2 + 1/2*m__1*v__2k^2;

Error, (in Units:-Simple:-+) the following expressions imply incompatible dimensions: {.1500000000*(-1.333333333*v__2k+2.)^2*Units:-Unit(J)+.1500000000*Units:-Unit(kg)*v__2k^2}

Sitting and trying find solution in help and on forum but no chance.

I hope if someone copy code into maple it will look lik on my screen. Anyway I have uploaded file and below You have screen picture.

If I remove units from variables on the top all is working like a charm.

Reagrds

Marcin

## Simple (not for me) problem in Maple...

Maple

Hi and Welcome Everyone here.

It is my first post and I am happy to have Maple 2020 Personal Edition. It is great tool and I am still learning.

Durng first weeks I solved many things with help and forums but I can't solve this simple one below:

How to force maple to divide a sqrtof (4*n^2 + 5*n - 7) by n to have each expression divided separately and all still inside of sqrt?

to get: by collect or expand function or anything else. I was able to do it by rewriting  in such form but it is not what I want to have since I need to rewriting it manually.

Can any "wizard of maple" help me to find an answer? Or at least give a hint in what direction to go, I will dig later myself.

Regards

Marcin

 Page 1 of 1
﻿