Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14261 > unrolled thread
| Started by | Tomas Garza <tgarza10@msn.com> |
|---|---|
| First post | 2013-04-20 09:56 +0000 |
| Last post | 2013-04-20 09:56 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: how to define and analyze function with multiple Tomas Garza <tgarza10@msn.com> - 2013-04-20 09:56 +0000
| From | Tomas Garza <tgarza10@msn.com> |
|---|---|
| Date | 2013-04-20 09:56 +0000 |
| Subject | Re: how to define and analyze function with multiple |
| Message-ID | <kktonl$c8p$1@smc.vnet.net> |
In[1]:= f[x_] := Piecewise[{{x^2, x < 0}, {x, x > 0}}]
In[2]:= NIntegrate[f[x], {x, -1, 1}]
Out[2]= 0.833333
-Tomas
> From: pjanakir1978@gmail.com
> Subject: how to define and analyze function with multiple parts
> To: mathgroup@smc.vnet.net
> Date: Fri, 19 Apr 2013 01:17:26 -0400
>
> 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
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web