MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Change integral variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88191] Re: Change integral variables
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Mon, 28 Apr 2008 04:36:51 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fv1fep$es1$1@smc.vnet.net>

Budaoy wrote:

> In Mathematica, how can I change integral variables? For example in
> integration:
> 
> Integrate[Sin[Sqrt[x]], x] if I want to use t^2=x to instead x in the
> integral, how can I achieve this?

You could write a function like the following one:

In[1]:= myIntegrate[f_, chng : (z_ -> g_), t_] :=
             Integrate[(f /. chng)*D[g, t], t]

myIntegrate[Sin[Sqrt[x]], x -> t^2, t]


Out[2]=

           2            2               2
2 (-Sqrt[t ] Cos[Sqrt[t ]] + Sin[Sqrt[t ]])


Note that if you are looking to get rid of the square roots, you must 
ask Mathematica to simplify the expression, giving it the correct 
assumptions. (By default, Mathematica works on the complex field.)

In[3]:= Simplify[%, Assumptions -> t >= 0]


Out[3]= 2 (-t Cos[t] + Sin[t])


> PS: Does Mathematica have a inertial form of some symbolic command,
> for instance, the above integration, if I only want an integration
> form but not an answer, what can I do?

You can achieve this by wrapping around the expression a *HoldForm[]* 
command. For instance,

In[4]:= HoldForm[Integrate[Sin[Sqrt[x]], x]] == Integrate[Sin[Sqrt[x]], x]

Out[4]= Integrate[Sin[Sqrt[x]], x] == -2 Sqrt[x] Cos[Sqrt[x]] + 2 
Sin[Sqrt[x]]


Regards,
-- Jean-Marc


  • Prev by Date: Common Multiple Value Question
  • Next by Date: Re: delayed function assignment
  • Previous by thread: Re: Change integral variables
  • Next by thread: Re: Change integral variables