Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Defining Functions and Simplifying Solutions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90553] Re: Defining Functions and Simplifying Solutions
  • From: dh <dh at metrohm.ch>
  • Date: Sat, 12 Jul 2008 05:35:11 -0400 (EDT)
  • References: <g56t8m$3pq$1@smc.vnet.net>


Hi,

see below,

Daniel



Locus wrote:

> Hello!

> 

> I actually have to questions:

> 

> 1. Is there a more handy way to define/use functions as compared to the following way (which works, but is complicated always typing the variable definitions):

> 

> G[\[Alpha]1_Real, \[Alpha]2_Real, e1_Real, 

>   e2_Real] = \[Alpha]1*e1 + \[Alpha]2*e2

> 

> v[G_Real] = a*G[\[Alpha]1, \[Alpha]2, e1, e2] + b

a function does not bother about the names of the parameters. Therefore 

instead of:

  G[\[Alpha]..]:= .. \[Alpha] ...

   you can as well say:

G[a..]=..a..

or you can do completely without names:

G= (..#1.. )&

> 

> 

> 2. After several steps, I receive the following solution

> 

> {{a -> (0. (e1 \[Beta]1 + e2 \[Beta]2 \[Lambda]))/(rA \[Tau]^2)}}

> 

> which obviously equals zero. How can I 'force' Mathematica to display only 0 as result and not such a unnessecarily complicated expression? FullSimplify does not work here.

  e1 could be infinity and then it does not be zero. You may avoid such 

problems by not using machine numbers but rationals or integers. Or, you 

may use "Chop" if the range of the result is approximately known.



> 

> 

> Thanks a lot!

> 





-- 



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at metrohm.com>

Internet:<http://www.metrohm.com>




  • Prev by Date: Re: Defining Functions and Simplifying Solutions
  • Next by Date: Fwd: Extracting points from a contour plot
  • Previous by thread: Re: Defining Functions and Simplifying Solutions
  • Next by thread: Re: Defining Functions and Simplifying Solutions