Skip to main content
Bumped by Community user
added 37 characters in body
Source Link
Anixx
  • 3.7k
  • 1
  • 20
  • 34

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

An example of possible equations:

Solve[(a+b J)^2==1,{a,b}]

Solve[(a+b J)^2 == (a + b J), {a, b}]

Solve[(a+b J)^2==J,{a,b}]   

Solve[(a+b J)^(a+b J)==1,{a,b}]

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

An example of possible equations:

Solve[(a+b J)^2==J,{a,b}]  Solve[(a+b J)^(a+b J)==1,{a,b}]

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

An example of possible equations:

Solve[(a+b J)^2==1,{a,b}]

Solve[(a+b J)^2 == (a + b J), {a, b}]

Solve[(a+b J)^2==J,{a,b}] 

Solve[(a+b J)^(a+b J)==1,{a,b}]

added 111 characters in body
Source Link
Anixx
  • 3.7k
  • 1
  • 20
  • 34

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

An example of possible equations:

Solve[(a+b J)^2==J,{a,b}] Solve[(a+b J)^(a+b J)==1,{a,b}]

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?

An example of possible equations:

Solve[(a+b J)^2==J,{a,b}] Solve[(a+b J)^(a+b J)==1,{a,b}]

Source Link
Anixx
  • 3.7k
  • 1
  • 20
  • 34

How do I improve this code for hyperbolic numbers so to allow equation-solving?

I have the following code, which allows evaluating expressions with split-complex unity J:

Unprotect[Power]; Power[0, 0] = 1; Protect[Power];
$Pre = If[FreeQ[#, J], #, Module[{tmp},
          
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] // 
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After first run it allows evaluating functions of J just as if it was an embedded constant. But trying to slove equations with it fails, and returns useless output. Can this code be modified so that Solve and Reduce also would work?