Maple 2022 Questions and Posts

These are Posts and Questions associated with the product, Maple 2022

I have an expression and I want to select the part of the expression which has diff(y(x),x) in the expression.

Using select(has,expr,diff(y(x),x) works, except when the expression happend to be exactly diff(y(x),x) in this case select returns diff()

I understand why this happens. But I can not avoid this problem by say first checking if the expression has more than one operand, because nops(diff(y(x),x) is 2 and not one. Also 1+diff(y(x),x) has two operands. And I can not check if the expression is of type `+` or `*` before, because other types can have more than one operand also.

So now what I do is the folliwng: first check if the expression has diff(y(x),x). If so, convert the expression to D and now check if nops is more than one, and if so, only now call select.

This is becuase nops(D(y)(x)) is one, while nops(diff(y(x),x) is two.

Is there a better way to do this, in order to avoid calling select and getting diff() ? I suppose I could also just check if the expression is exactly diff(y(x),x) before even calling select or has and avoid all this?

Worksheet attached


 

interface(version)

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

#the wrong way
expr:=diff(y(x),x):
if has(expr,diff(y(x),x)) then
   part_with_diff:=select(has,expr,diff(y(x),x));
fi;

diff()

#add extra check,  example 1
expr:=diff(y(x),x):
if has(expr,diff(y(x),x)) then
    if nops(convert(expr,D))>1 then
       part_with_diff:=select(has,expr,diff(y(x),x));
    else
       print("expression is itself diff(y(x),x))");
    fi;
fi;

"expression is itself diff(y(x),x))"

#add extra check, example 2
expr:=1+3*diff(y(x),x):
if has(expr,diff(y(x),x)) then
    if nops(convert(expr,D))>1 then
       part_with_diff:=select(has,expr,diff(y(x),x));
       print("part_with_diff=",part_with_diff);
    else
       print("expression is diff(y(x),x))");
    fi;
fi;

"part_with_diff=", 3*(diff(y(x), x))


 

Download best_way_to_check.mw

maple_calculations.mw

Why does my sequence return 0 at n=9 and n=10, when it should be 4?

Beneath the sequence i have also calculated the limit of f, as x approaches infinity, and it returns 4.

Below the initial screenshot, i have displayed a screenshot of the same plot but with a much bigger x-axis. It seems something weird happens at very large numbers of x. Is it a glitch, and if so how do i fix it?

here is the maple document containing the calculations below: maple_calculations.mw

I'd like to plot row[i] of M_jk (left axis) vs. row[i] of M_ki (right axis). i is the x axis, and varies discretely from 1 to 10 (number of runs). See attached screenshot below for details. My result is off in terms of values... How to fix my plot command?

 

Dear friends,

I found a file in the Maplesoft Application Center to evaluate the minimum of a function in two variables.

I tried to extend the code to find a minimum for a function in 4 variables.

But the code does not work. Any Help, I will be appreciated.

Amr

Gradient_Search_Program_Code-22-9-2022.mw

restartNULL

NULL``

Can I disable maple's use of the ' function? (aka prime/derivative function)

 

For example, if

 

f := x^2+1

x^2+1

(1)

it's derivative is obtained as

 

Diff(f(x), x) = diff(f(x), x)

Diff(x^2+1, x) = 2*x

(2)

.

We used the prime operator on the f to obtain f' on the right-hand-side.

 

The problem is, I use prime notation as a naming convention like in defining an integral equation such as:

"psi(t)=∫G(t,t')*psi(t') ⅆt' ."

NULL

This is common practice in many texts.

 

Is there a way that I can disable the operator function of ' so I can use it as a naming scheme? I have tried using the Alias( ) command which works on one evaluation but if an equation is passed to another function the Alias( ) command is extinguished by the previous evaluation and it takes the derivative again which is undesired.

how_do_i_disable_prime_operation.mw

Given

expr:=c[2]*sin(sqrt(3)*x/2) + c[3]*cos(sqrt(3)*x/2);
expr:=convert(expr,tan);

How to change the second result above (with the tan) back the the original form it was in?

I tried all different convert and simplification commands, and non managed to get back the original form.

convert(expr,sincos);
simplify(expr,size);
#etc...

Maple 2022.1 on windows 10

Hi!

I am doing some vector calculations with maple 2022, and I would like to gain a better understanding of how spherical derivatives of spherical vectors are calculated.  How can I ask maple to show the solution for this calculation?

spherical_derivatives.mw

Thanks in advance!

I have a whole lot of conditions to test on the signum of answers. This gets difficult to read so I am wondering could something like the following be done?

a, b, c, d := 1, -1, 1, -1;
if a, b, c, d = 1, 0, -1, -1 then
    print("foo");
end if;

The above obviously doesn't work. The reason I would like to do this is it would be simple to read the patterns of 1's and 0's.

Any ideas?

matrix_inverse.mw

Here attached is my script. The execution of the worksheet gets stuck at the MatrixInverse(M) step. What do you suggest in order to speed up the computation?

As you can see, my matrix M is a 3x3 symmetric matrix, but quite convoluted. Eventually, I need to multiply the resulting inverse by another (row) vector.

Thank you for looking into this!

I do not remember is this was asked before.

In other OOP languages such as Java, it allows one to name object variable name same as method name. I found this example on the net for java to illustrate

class Test {

  private boolean isVal;

  public boolean isVal() {
      return isVal;
  }

}

In Maple, this is not allowed. So now I have to come up with new name for either the method or the variable that returns that hidden internal variable.

Here is an example

A:=module()
  option object;
  local is_valid::truefalse:=false;
  export is_valid::static:=proc(_self,$)::truefalse;
    return _self:-is_valid;
  end proc;
end module;

THis gives error

Error, (in A) exported variable `is_valid` cannot be multiply declared

It will be nice if Maple allows this. For now one has to rename either the variable or the method. Which is little annoying.

Is this something that could  be easily added to Maple in a future release?

I changed today my code to use DEtools:-odeadvisor(ode,y(x),[linear]); to check that the ode is linear or not before calling DEtools:-convertAlg 

The problem is that sometimes the advisor returns _linear on what is not linear ode (at least the way it is originally written). Here is an example

              (x+y(x))*diff(y(x),x) = 0;

From help page:

 

In the event that convertAlg cannot isolate for the proper list form (for instance, if the DE is not a linear ODE) then FAIL is returned.

 

So now I am worried  that using odeadvisor to check for linear ode is not the right method.

Is there a build-in method in Maple to check if an ode is linear or not? (I do have my own code to do this, but I thought it is better to use a buildin method, as it will be more robust).

Should DEtools:-odeadvisor(ode,y(x),[linear]) have returned _linear in this case?

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

ode:=(x+y(x))*diff(y(x),x) = 0;
DEtools:-odeadvisor(ode,y(x));
#check if linear ODE
DEtools:-odeadvisor(ode,y(x),[linear]);

(x+y(x))*(diff(y(x), x)) = 0

[_quadrature]

[_linear]

DEtools:-convertAlg(ode,y(x));

FAIL

 

Download why_fail_sept_17_2022.mw

Hi senior, I am using Maple 2022 version. I am facing a issue regrading opening of maple worksheet. If connected with wifi then maple worksheet will open and work properly, while i disconnected the internet, maple crashed and pop up a message to activate license again..

dAlmbert ode has the form

 

Also from Maple own help page, it agrees with Wikipedia and says:

 

Now, given this ode

ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x));
eval(ode,diff(y(x),x)=p)

Then clearly the above is not dAlmbert. Right? it is missing the x. But odeadvisor says it is:

restart;
ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x));
DEtools:-odeadvisor(ode)

What Am I missing here?

Update

These are the rules I know about this ode. For y=x f(p)+ g(p). 

g(p) can be zero, yes, but in this case, f(p) has to be nonlinear in p for it to be dAlembert (else it will be either separable or linear.

I did not think f(p) can be zero and it remains dAlermber, even if g(p) remains nonlinear in p. So y=g(p) can not be dAlembert, even if g(p) is nonlinear.

May be Maple uses its own definition of dAlembert?. I do not know. This will be new definition to me. Is there a reference that mentions this case of y=g(p) classified as dAlembert for nonlinear g?

Maple 2022.1 on windows 10

Problem statement:
Determine the relativistic uniformly accelerated motion, i.e. the rectilinear motion for which the acceleration w in the proper reference frame (at each instant of time) remains constant.

As an application of the post presented by Dr Cheb Terrab in MaplePrimes on the principle of relativity ( found here ), we solve the problem stated on page 24 of Landau & Lifshitz book [1], which makes use of the relativistic invariant condition of the constancy of a four-scalar, viz., `w__μ`*w^mu where w^mu is the four-acceleration. This little problem exemplify beautifully how to use invariance in relativity. This is the so-called hyperbolic motion and we explain why at the end of this worksheet.

NULL

let's introduce the coordinate system, X = (x, y, z, tau)with tau = c*t 

with(Physics)

Setup(coordinates = [X = (x, y, z, tau)])

[coordinatesystems = {X}]

(1)

%d_(s)^2 = g_[lineelement]

%d_(s)^2 = -Physics:-d_(x)^2-Physics:-d_(y)^2-Physics:-d_(z)^2+Physics:-d_(tau)^2

(2)

NULL

Four-velocity

 

The four-velocity is defined by  u^mu = dx^mu/ds and dx^mu/ds = dx^mu/(c*sqrt(1-v^2/c^2)*dt) 

Define this quantity as a tensor.

Define(u[mu], quiet)

The four velocity can therefore be computing using

u[`~mu`] = d_(X[`~mu`])/%d_(s(tau))

u[`~mu`] = Physics:-d_(Physics:-SpaceTimeVector[`~mu`](X))/%d_(s(tau))

(1.1)

NULL

As to the interval d(s(tau)), it is easily obtained from (2) . See Equation (4.1.5)  here with d(diff(tau(x), x)) = d(s(tau)) for in the moving reference frame we have that d(diff(x, x)) = d(diff(y(x), x)) and d(diff(y(x), x)) = d(diff(z(x), x)) and d(diff(z(x), x)) = 0.

 Thus, remembering that the velocity is a function of the time and hence of tau, set

%d_(s(tau)) = d(tau)*sqrt(1-v(tau)^2/c^2)

%d_(s(tau)) = Physics:-d_(tau)*(1-v(tau)^2/c^2)^(1/2)

(1.2)

subs(%d_(s(tau)) = Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2), u[`~mu`] = Physics[d_](Physics[SpaceTimeVector][`~mu`](X))/%d_(s(tau)))

u[`~mu`] = Physics:-d_(Physics:-SpaceTimeVector[`~mu`](X))/(Physics:-d_(tau)*(1-v(tau)^2/c^2)^(1/2))

(1.3)

Rewriting the right-hand side in components,

lhs(u[`~mu`] = Physics[d_](Physics[SpaceTimeVector][`~mu`](X))/(Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2))) = Library:-TensorComponents(rhs(u[`~mu`] = Physics[d_](Physics[SpaceTimeVector][`~mu`](X))/(Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2))))

u[`~mu`] = [Physics:-d_(x)/(Physics:-d_(tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), Physics:-d_(y)/(Physics:-d_(tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), Physics:-d_(z)/(Physics:-d_(tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), 1/(-(v(tau)^2-c^2)/c^2)^(1/2)]

(1.4)

Next we introduce explicitly the 3D velocity components while remembering that the moving reference frame travels along the positive x-axis

NULL

simplify(u[`~mu`] = [Physics[d_](x)/(Physics[d_](tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), Physics[d_](y)/(Physics[d_](tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), Physics[d_](z)/(Physics[d_](tau)*(-(v(tau)^2-c^2)/c^2)^(1/2)), 1/(-(v(tau)^2-c^2)/c^2)^(1/2)], {d_(x)/d_(tau) = v(tau)/c, d_(y)/d_(tau) = 0, d_(z)/d_(tau) = 0}, {d_(x), d_(y), d_(z)})

u[`~mu`] = [v(tau)/(c*((c^2-v(tau)^2)/c^2)^(1/2)), 0, 0, 1/(-(v(tau)^2-c^2)/c^2)^(1/2)]

(1.5)

Introduce now this explicit definition into the system

Define(u[`~mu`] = [v(tau)/(c*((c^2-v(tau)^2)/c^2)^(1/2)), 0, 0, 1/(-(v(tau)^2-c^2)/c^2)^(1/2)])

{Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], u[mu], w[`~mu`], w__o[`~mu`], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(1.6)

NULL

Computing the four-acceleration

 

This quantity is defined by the second derivative w^mu = d^2*x^mu/ds^2 and d^2*x^mu/ds^2 = du^mu/ds and du^mu/ds = du^mu/(c*sqrt(1-v^2/c^2)*dt)

Define this quantity as a tensor.

Define(w[mu], quiet)

Applying the definition just given,

w[`~mu`] = d_(u[`~mu`])/%d_(s(tau))

w[`~mu`] = Physics:-d_[nu](u[`~mu`], [X])*Physics:-d_(Physics:-SpaceTimeVector[`~nu`](X))/%d_(s(tau))

(2.1)

Substituting for d_(s(tau))from (1.2) above

subs(%d_(s(tau)) = Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2), w[`~mu`] = Physics[d_][nu](u[`~mu`], [X])*Physics[d_](Physics[SpaceTimeVector][`~nu`](X))/%d_(s(tau)))

w[`~mu`] = Physics:-d_[nu](u[`~mu`], [X])*Physics:-d_(Physics:-SpaceTimeVector[`~nu`](X))/(Physics:-d_(tau)*(1-v(tau)^2/c^2)^(1/2))

(2.2)

Introducing now this definition (2.2)  into the system,

Define(w[`~mu`] = Physics[d_][nu](u[`~mu`], [X])*Physics[d_](Physics[SpaceTimeVector][`~nu`](X))/(Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2)), quiet)

lhs(w[`~mu`] = Physics[d_][nu](u[`~mu`], [X])*Physics[d_](Physics[SpaceTimeVector][`~nu`](X))/(Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2))) = TensorArray(rhs(w[`~mu`] = Physics[d_][nu](u[`~mu`], [X])*Physics[d_](Physics[SpaceTimeVector][`~nu`](X))/(Physics[d_](tau)*(1-v(tau)^2/c^2)^(1/2))))

w[`~mu`] = Array(%id = 36893488148327765764)

(2.3)

Recalling that tau = c*t, we get

"PDETools:-dchange([tau=c*t],?,[t],params=c)"

w[`~mu`] = Array(%id = 36893488148324030572)

(2.4)

Introducing anew this definition (2.4)  into the system,

"Define(w[~mu]=rhs(?),redo,quiet):"

NULL

In the proper referential, the velocity of the particle vanishes and the tridimensional acceleration is directed along the positive x-axis, denote its value by `#msub(mi("w"),mn("0"))`

Hence, proceeding to the relevant substitutions and introducing the corresponding definition into the system, the four-acceleration in the proper referential reads

  "Define(`w__o`[~mu]= subs(v(t)=`w__0`, v(t)=0,rhs(?)),quiet):"

w__o[`~mu`] = TensorArray(w__o[`~mu`])

w__o[`~mu`] = Array(%id = 36893488148076604940)

(2.5)

NULL

The differential equation solving the problem

 

NULL``

Everything is now set up for us to establish the differential equation that will solve our problem. It is at this juncture that we make use of the invariant condition stated in the introduction.

The relativistic invariant condition of uniform acceleration must lie in the constancy of a 4-scalar coinciding with `w__μ`*w^mu  in the proper reference frame.

We simply write the stated invariance of the four scalar (d*u^mu*(1/(d*s)))^2 thus:

w[mu]^2 = w__o[mu]^2

w[mu]*w[`~mu`] = w__o[mu]*w__o[`~mu`]

(3.1)

TensorArray(w[mu]*w[`~mu`] = w__o[mu]*w__o[`~mu`])

(diff(v(t), t))^2*c^2/(v(t)^2-c^2)^3 = -w__0^2/c^4

(3.2)

NULL

This gives us a first order differential equation for the velocity.

 

Solving the differential equation for the velocity and computation of the distance travelled

 

NULL

Assuming the proper reference frame is starting from rest, with its origin at that instant coinciding with the origin of the fixed reference frame, and travelling along the positive x-axis, we get successively,

NULL

dsolve({(diff(v(t), t))^2*c^2/(v(t)^2-c^2)^3 = -w__0^2/c^4, v(0) = 0})

v(t) = t*c*w__0/(t^2*w__0^2+c^2)^(1/2), v(t) = -t*c*w__0/(t^2*w__0^2+c^2)^(1/2)

(4.1)

NULL

As just explained, the motion being along the positive x-axis, we take the first expression.

[v(t) = t*c*w__0/(t^2*w__0^2+c^2)^(1/2), v(t) = -t*c*w__0/(t^2*w__0^2+c^2)^(1/2)][1]

v(t) = t*c*w__0/(t^2*w__0^2+c^2)^(1/2)

(4.2)

This can be rewritten thus

v(t) = w__0*t/sqrt(1+w__0^2*t^2/c^2)

v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2)

(4.3)

It is interesting to note that the ultimate speed reached is the speed of light, as it should be.

`assuming`([limit(v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2), t = infinity)], [w__0 > 0, c > 0])

limit(v(t), t = infinity) = c

(4.4)

NULL

The space travelled is simply

x(t) = Int(rhs(v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2)), t = 0 .. t)

x(t) = Int(w__0*t/(1+w__0^2*t^2/c^2)^(1/2), t = 0 .. t)

(4.5)

`assuming`([value(x(t) = Int(w__0*t/(1+w__0^2*t^2/c^2)^(1/2), t = 0 .. t))], [c > 0])

x(t) = c*((t^2*w__0^2+c^2)^(1/2)-c)/w__0

(4.6)

expand(x(t) = c*((t^2*w__0^2+c^2)^(1/2)-c)/w__0)

x(t) = c*(t^2*w__0^2+c^2)^(1/2)/w__0-c^2/w__0

(4.7)

This can be rewritten in the form

x(t) = c^2*(sqrt(1+w__0^2*t^2/c^2)-1)/w__0

x(t) = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0

(4.8)

NULL

The classical limit corresponds to an infinite velocity of light; this entails an instantaneous propagation of the interactions, as is conjectured in Newtonian mechanics.
The asymptotic development gives,

lhs(x(t) = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0) = asympt(rhs(x(t) = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0), c, 4)

x(t) = (1/2)*w__0*t^2+O(1/c^2)

(4.9)

As for the velocity, we get

lhs(v(t) = t*c*w__0/(t^2*w__0^2+c^2)^(1/2)) = asympt(rhs(v(t) = t*c*w__0/(t^2*w__0^2+c^2)^(1/2)), c, 2)

v(t) = t*w__0+O(1/c^2)

(4.10)

Thus, the classical laws are recovered.

NULL

Proper time

 

NULL

This quantity is given by "t'= ∫ dt sqrt(1-(v^(2))/(c^(2)))" the integral being  taken between the initial and final improper instants of time

Here the initial instant is the origin and we denote the final instant of time t.

NULL

`#mrow(mi("t"),mo("′"))` = Int(sqrt(1-rhs(v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2))^2/c^2), t = 0 .. t)

`#mrow(mi("t"),mo("′"))` = Int((1-w__0^2*t^2/((1+w__0^2*t^2/c^2)*c^2))^(1/2), t = 0 .. t)

(5.1)

Finally the proper time reads

`assuming`([value(`#mrow(mi("t"),mo("′"))` = Int((1-w__0^2*t^2/((1+w__0^2*t^2/c^2)*c^2))^(1/2), t = 0 .. t))], [w__0 > 0, c > 0, t > 0])

`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0

(5.2)

When proc (t) options operator, arrow; infinity end proc, the proper time grows much more slowly than t according to the law

`assuming`([lhs(`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0) = asympt(rhs(`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0), t, 1)], [w__0 > 0, c > 0])

`#mrow(mi("t"),mo("′"))` = (ln(2*w__0/c)+ln(t))*c/w__0+O(1/t^2)

(5.3)

combine(`#mrow(mi("t"),mo("′"))` = (ln(2*w__0/c)+ln(t))*c/w__0+O(1/t^2), ln, symbolic)

`#mrow(mi("t"),mo("′"))` = ln(2*t*w__0/c)*c/w__0+O(1/t^2)

(5.4)

NULL

Evolution of the four-acceleration of the moving frame as observed from the fixed reference frame

 

NULL

To obtain the four-acceleration as a function of time, simply substitute for the 3-velocity (4.3)  in the 4-acceleration (2.4)

" simplify(subs(v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2),?),symbolic)"

w[`~mu`] = Array(%id = 36893488148142539108)

(6.1)

" w[t->infinity]^(  mu)=map(limit,rhs(?),t=infinity) assuming `w__0`>0,c>0"

`#msubsup(mi("w"),mrow(mi("t"),mo("→"),mo("∞")),mrow(mo("⁢"),mo("⁢"),mi("μ",fontstyle = "normal")))` = Array(%id = 36893488148142506460)

(6.2)

We observe that the non-vanishing components of the four-acceleration of the accelerating reference frame get infinite while those components in the moving reference frame keep their constant values . (2.5)

NULL

Evolution of the three-acceleration as observed from the fixed reference frame

 

NULL

This quantity is obtained simply by differentiating the velocity v(t)given by  with respect to the time t.

 

simplify(diff(v(t) = w__0*t/(1+w__0^2*t^2/c^2)^(1/2), t), size)

diff(v(t), t) = w__0/(1+w__0^2*t^2/c^2)^(3/2)

(7.1)

Here also, it is interesting to note that the three-acceleration tends to zero. This fact was somewhat unexpected.

map(limit, diff(v(t), t) = w__0/(1+w__0^2*t^2/c^2)^(3/2), t = infinity)

limit(diff(v(t), t), t = infinity) = 0

(7.2)

NULL

At the beginning of the motion, the acceleration should be w__0, as Newton's mechanics applies then

NULL

`assuming`([lhs(diff(v(t), t) = w__0/(1+w__0^2*t^2/c^2)^(3/2)) = series(rhs(diff(v(t), t) = w__0/(1+w__0^2*t^2/c^2)^(3/2)), t = 0, 2)], [c > 0])

diff(v(t), t) = series(w__0+O(t^2),t,2)

(7.3)

NULL

Justification of the name hyperbolic motion

 

NULL

Recall the expressions for x and diff(t(x), x)and obtain a parametric description of a curve, with diff(t(x), x)as parameter. This curve will turn out to be a hyperbola.

subs(x(t) = x, x(t) = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0)

x = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0

(8.1)

`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0

`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0

(8.2)

The idea is to express the variables x and t in terms of diff(t(x), x).

 

isolate(`#mrow(mi("t"),mo("′"))` = arcsinh(t*w__0/c)*c/w__0, t)

t = sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)*c/w__0

(8.3)

subs(t = sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)*c/w__0, x = c^2*((1+w__0^2*t^2/c^2)^(1/2)-1)/w__0)

x = c^2*((1+sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2)^(1/2)-1)/w__0

(8.4)

`assuming`([simplify(x = c^2*((1+sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2)^(1/2)-1)/w__0)], [positive])

x = c^2*(cosh(`#mrow(mi("t"),mo("′"))`*w__0/c)-1)/w__0

(8.5)

We now show that the equations (8.3) and (8.5) are parametric equations of a hyperbola with parameter the proper time diff(t(x), x)

 

Recall the hyperbolic trigonometric identity

cosh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2-sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2 = 1

cosh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2-sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2 = 1

(8.6)

Then isolating the sinh and the cosh from equations (8.3) and (8.5),

NULL

isolate(t = sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)*c/w__0, sinh(`#mrow(mi("t"),mo("′"))`*w__0/c))

sinh(`#mrow(mi("t"),mo("′"))`*w__0/c) = t*w__0/c

(8.7)

isolate(x = c^2*(cosh(`#mrow(mi("t"),mo("′"))`*w__0/c)-1)/w__0, cosh(`#mrow(mi("t"),mo("′"))`*w__0/c))

cosh(`#mrow(mi("t"),mo("′"))`*w__0/c) = x*w__0/c^2+1

(8.8)

and substituting these in (8.6) , we get the looked-for Cartesian equation

 

subs(sinh(`#mrow(mi("t"),mo("′"))`*w__0/c) = t*w__0/c, cosh(`#mrow(mi("t"),mo("′"))`*w__0/c) = x*w__0/c^2+1, cosh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2-sinh(`#mrow(mi("t"),mo("′"))`*w__0/c)^2 = 1)

(x*w__0/c^2+1)^2-w__0^2*t^2/c^2 = 1

(8.9)

NULL

This is the Cartesian equation of a hyperbola, hence the name hyperbolic motion

NULL

Reference

 

[1] Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.

NULL

Download Uniformly_accelerated_motion.mw

I need to count how many times a special function shows up in an expression.

The problem is that indets returns a set. So if the same function shows up more than one time in the original expression, with same arguments, only one of these will show up in the result. So I would not know if there were mmore than one of these.

Here is a simple example, using sin(x) here.

restart;
expr:=sin(x)+3*cos(x)*sin(x)+1/sin(2*x);
indets(expr,'specfunc(anything,sin)')

#gives
#   {sin(x), sin(2*x)}

So when I do nops() on the above, it gives 2 and not 3.

How to obtain number of times a function shows in an expression, even it if is repeated?

1 2 3 4 5 6 7 Last Page 1 of 10