Re: how to define and analyze function with multiple parts

• To: mathgroup at smc.vnet.net
• Subject: [mg130547] Re: how to define and analyze function with multiple parts
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Sat, 20 Apr 2013 05:44:09 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <20130419051727.00BE06B14@smc.vnet.net>

```Perhaps you have in mind something like the following (for n = 3)?

u1[{x_,y_,z_}]:=3x-4y+z
u2[{x_,y_,z_}]:=10x y z

u[{x_, y_, z_}] :=
Piecewise[{{u1[{x, y, z}], x^2 + y^2 + 3 z^2 <= 1},
{u2[{x, y, z}], x^2 + y^2 + z^3 > 100}}]

On Apr 19, 2013, at 1:17 AM, pjanakir1978 at gmail.com wrote:

> Hi, I have a function on the plane that has 2 different formulation for 2 different regions. Let x = (x1, ..., xn). I want to define it as
>
> U(x) = U_1(x) if x is in region 1
>       = U_2(x) if x is in region 2
>
> Then I want to analyze such a defined function, like find its max, etc, using NMaximize, or put in some other expressions in place of x, to see behavior of U.
>
> Essentially, how does one define a multipart function, so that we can analyze it in the same way we may analyze a single part function or polynomial?
>
> Thanks.
>
> Prabhu

---
Murray Eisenberg                                    murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: Sample Workbooks - Suggested sources to get a newbie going?
• Next by Date: Speak errors (was Re: audio)
• Previous by thread: Re: how to define and analyze function with multiple parts
• Next by thread: Re: how to define and analyze function with multiple