#include "mathlink.h"
/* put an Integrate[] expression to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "Integrate", 2))
{ /* unable to put the function to lp */ }
if(! MLPutFunction(lp, "Times", 2))
{ /* unable to put the function to lp */ }
if(! MLPutFunction(lp, "Power", 2))
{ /* unable to put the function to lp */ }
if(! MLPutSymbol(lp, "x", 1))
{ /* unable to put the symbol to lp */ }
if( ! MLPutInteger(lp, 2))
{ /* unable to put the integer to lp */ }
if(! MLPutFunction(lp, "Power", 2))
{ /* unable to put the function to lp */ }
if(! MLPutFunction(lp, "Sqrt", 1))
{ /* unable to put the function to lp */ }
if(! MLPutSymbol(lp, "x", 1))
{ /* unable to put the symbol to lp */ }
if(! MLPutInteger(lp, -1))
{ /* unable to put the integer to lp */ }
if(! MLPutSymbol(lp, "x", 1))
{ /* unable to put the symbol to lp */ }
if(! MLEndPacket(lp))
{ /* unable to send the end-of-packet sequence to lp */ }
if(! MLFlush(lp))
{ /* unable to flush any buffered output data in lp */ }
}