1

I want to do something simple.

I want to define a variable such that a^2=0, so that say:

Exp(a) = 1+a

And any other function automatically f(a)=1+f'(0)a.

Is it possible to do that in Mathematica?

user1505725
  • 148
  • 5

3 Answers3

0

I guess what you need is

1 + Exp[a] + f[Exp[b]] /. Exp[x_] -> 1 + x

2+a+f[1+b]

Edit:


for your comment:

a^3 + a^2 /. a^3 -> a^2 + 1

works as you wish.


f[a] /. a -> 0
AsukaMinato
  • 9,758
  • 1
  • 14
  • 40
0

Another using [Full]Simplify method

a^2 + 1 // Simplify[#, a^2 == 0]&
AsukaMinato
  • 9,758
  • 1
  • 14
  • 40
0

I suppose you could do:

Power[a, n_] /; n >= 2 ^:= 0

(using UpSetDelayed)

a
(* a *)

a^2 (* 0 *)

Series[Exp[a], {a, 0, 10}] // Normal (* 1 + a *)

chuy
  • 11,205
  • 28
  • 48