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

MathGroup Archive 2010

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

Search the Archive

Re: Re: Simplify with NestedLessLess?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106585] Re: [mg106531] Re: [mg106487] Simplify with NestedLessLess?
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sun, 17 Jan 2010 07:11:40 -0500 (EST)
  • References: <201001141049.FAA19892@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

Oops... Normal was extraneous there. I had another solution using Series,  
but I switched to Limit.

Clear[h]
h[expr_] /; FreeQ[expr, C] || FreeQ[expr, Cf] := expr
h[expr_] := Limit[expr /. C -> delta Cf, delta -> 0]

expr = -Cf^2 L2^2 Rg^2 Vg^4 +
    3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg);
vars = Complement[Variables@expr, {C, Cf}];
Collect[expr, vars, h]

-Cf^2 L2^2 Rg^2 Vg^4 + Rg^2 (12 Cf Vd^2 + 6 C Vd Vg)

Bobby

On Sat, 16 Jan 2010 23:00:46 -0600, DrMajorBob <btreat1 at austin.rr.com>  
wrote:

>> Vg is potentially much larger than Vd (last two terms). In other words,  
>> the magnitude of Vd, Vg and L2 could conspire together to make the last  
>> term significant even though C<<Cf.
>
> The same can be said for ANY term you want to ignore, can it not?
>
> But never mind; I think you want to apply the technique I just showed  
> you, but only to individual coefficients in
>
> Collect[-Cf^2 L2^2 Rg^2 Vg^4 +
>    3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg), {L2, Rg, Vg}]
>
> -Cf^2 L2^2 Rg^2 Vg^4 + Rg^2 (12 C Vd^2 + 12 Cf Vd^2 + 6 C Vd Vg)
>
> ...but ONLY if C and Cf both appear in the same coefficient.
>
> That's a strange set of conditions, in my opinion, but here's a way to  
> do it:
>
> Clear[h]
> h[expr_] /; FreeQ[expr, C] || FreeQ[expr, Cf] := expr
> h[expr_] := Normal[Limit[expr /. C -> delta Cf, delta -> 0]]
>
> expr = -Cf^2 L2^2 Rg^2 Vg^4 +
>     3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg);
> vars = Complement[Variables@expr, {C, Cf}];
> Collect[expr, vars, h]
>
> -Cf^2 L2^2 Rg^2 Vg^4 + Rg^2 (12 Cf Vd^2 + 6 C Vd Vg)
>
> % == -Cf^2 L2^2 Rg^2 Vg^4 +
>     3 (4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg) // Simplify
>
> True
>
> Bobby
>
> On Sat, 16 Jan 2010 21:09:38 -0600, Dave Bird <dbird at ieee.org> wrote:
>
>> Yes, but when we make delta->0 we eliminate _all_ C terms, thus missing  
>> the correct answer of
>>
>> -Cf^2 L2^2 Rg^2 Vg^4+3 (4 Cf Rg^2 Vd^2+2 C Rg^2 Vd Vg)
>>
>> Vg is potentially much larger than Vd (last two terms). In other words,  
>> the magnitude of Vd, Vg and L2 could conspire together to make the last  
>> term significant even though C<<Cf.
>>
>> Dave
>>
>> DrMajorBob wrote:
>>> You said C<<Cf, so let's say C = delta CF, where delta is small. We  
>>> compute a series around delta=0 and, after giving it a look, we set  
>>> delta = 0.
>>>
>>> expr =
>>>  Normal@Series[-Cf^2 L2^2 Rg^2 Vg^4 +
>>>      3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg) /.
>>>     C -> delta Cf, {delta, 0, 6}]
>>> firstTry = expr /. delta -> 0
>>>
>>> 12 Cf Rg^2 Vd^2 - Cf^2 L2^2 Rg^2 Vg^4 +
>>>  delta (12 Cf Rg^2 Vd^2 + 6 Cf Rg^2 Vd Vg)
>>>
>>> 12 Cf Rg^2 Vd^2 - Cf^2 L2^2 Rg^2 Vg^4
>>>
>>> In a more complicated situation (if a few Series terms were  
>>> unconvincing), we might use Limit, instead:
>>>
>>> expr = -Cf^2 L2^2 Rg^2 Vg^4 +
>>>    3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg) /. C -> delta Cf
>>> secondTry = Limit[expr, delta -> 0]
>>>
>>> -Cf^2 L2^2 Rg^2 Vg^4 +
>>>  3 (4 Cf Rg^2 Vd^2 + 4 Cf delta Rg^2 Vd^2 + 2 Cf delta Rg^2 Vd Vg)
>>>
>>> Cf Rg^2 (12 Vd^2 - Cf L2^2 Vg^4)
>>>
>>> In this case, both answers are the same:
>>>
>>> firstTry == secondTry // Simplify
>>>
>>> True
>>>
>>> Bobby
>>>
>>> On Sat, 16 Jan 2010 13:38:22 -0600, Dave Bird <dbird at ieee.org> wrote:
>>>
>>>> Interesting! But, I don't think I am correctly communicating what I'm  
>>>> after yet. (Although, I admit that I am struggling some to keep up  
>>>> with you guys in your Mathematica replies due to my inexperience.)
>>>>
>>>> The original expression that I put up for illustration is:
>>>>
>>>> -Cf^2 L2^2 Rg^2 Vg^4+3 (4 C Rg^2 Vd^2+4 Cf Rg^2 Vd^2+2 C Rg^2 Vd Vg)
>>>>
>>>> We compare 4 C Rg^2 Vd^2 to 4 Cf Rg^2 Vd^2 because the two terms  
>>>> share common coefficients so that they "reduce" to (4 Rg^2 Vd^2+4  
>>>> Rg^2 Vd^2) (C+Cf) . Thus it becomes obvious that C may be discarded  
>>>> w.r.t. Cf.
>>>>
>>>> Please forgive if I have missed the correct application of your  
>>>> suggestion, and thanks for the interest.
>>>>
>>>> Dave
>>>>
>>>> DrMajorBob wrote:
>>>>> Series[-Cf^2 L2^2 Rg^2 Vg^4 +
>>>>>    3 (4 C Rg^2 Vd^2 + 4 Cf Rg^2 Vd^2 + 2 C Rg^2 Vd Vg), {C, 0,
>>>>>    5}] // Simplify
>>>>>
>>>>> SeriesData[C, 0, {
>>>>>  Cf Rg^2 (12 Vd^2 - Cf L2^2 Vg^4), 6 Rg^2 Vd (2 Vd + Vg)}, 0, 6, 1]
>>>>>
>>>>> Bobby
>>>>>
>>>>> On Fri, 15 Jan 2010 02:21:09 -0600, Dave Bird <dbird at ieee.org> wrote:
>>>>>
>>>>>> Not infinitesimals. I'm working in analog circuit design/analysis. I
>>>>>> have a 3 pole symbolic circuit response (third order) which is not
>>>>>> easily separable. I can use Mathematica to find the three roots of  
>>>>>> the
>>>>>> response. But, the roots are, of course, very messy. I know that  
>>>>>> certain
>>>>>> elements in the circuit are orders of magnitude larger than other  
>>>>>> like
>>>>>> elements - capacitors in this case. For example, one small section  
>>>>>> of
>>>>>> one root is
>>>>>>
>>>>>> -Cf^2 L2^2 Rg^2 Vg^4+3 (4 C Rg^2 Vd^2+4 Cf Rg^2 Vd^2+2 C Rg^2 Vd Vg)
>>>>>>
>>>>>> I know that C<<Cf. By careful inspection, I can see that the first  
>>>>>> term
>>>>>> in the parens will drop out compared to the second term in the  
>>>>>> parens. I
>>>>>> would like Mathematica to do this without my having to examine it so
>>>>>> closely since there are many other like situations.
>>>>>>
>>>>>> This kind of situation occurs in many other engineering situations.
>>>>>>
>>>>>> Hope this helps clarify.
>>>>>>
>>>>>> Thanks for the interest.
>>>>>>
>>>>>> Dave
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Daniel Lichtblau wrote:
>>>>>>> Dave Bird wrote:
>>>>>>>> Thanks Daniel for the observation. I forgot to add that both a,  
>>>>>>>> and b
>>>>>>>> are real positive. That, of course would have to be added to the
>>>>>>>> assumptions.
>>>>>>>>
>>>>>>>> Dave
>>>>>>>
>>>>>>> It's still not obvious what you are wanting to do. I have the idea  
>>>>>>> you
>>>>>>> are working in some sense with infinitesmals. If so, I doubt  
>>>>>>> Simplify
>>>>>>> would be the best tool for removing them; it really can only do  
>>>>>>> that
>>>>>>> if it is told, in some way, to replace them with zero. How might  
>>>>>>> one
>>>>>>> instruct Simplify to figure that out?
>>>>>>>
>>>>>>> Daniel
>>>>>>>
>>>>>>>
>>>>>>>> Daniel Lichtblau wrote:
>>>>>>>>> dbird wrote:
>>>>>>>>>> Please excuse if this has been answered before, but I can't  
>>>>>>>>>> find it.
>>>>>>>>>>
>>>>>>>>>> Is there some way to do a Simplify with assumptions using a
>>>>>>>>>> NestedLessLess or something similar? For example:
>>>>>>>>>>
>>>>>>>>>> d=a+b
>>>>>>>>>> Simplify[d,NestedLessLess[a,b]]
>>>>>>>>>>
>>>>>>>>>> Answer is:
>>>>>>>>>> a+b
>>>>>>>>>>
>>>>>>>>>> Answer should be:
>>>>>>>>>> b
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Dave
>>>>>>>>>
>>>>>>>>> I fail to see why the result should be b.
>>>>>>>>>
>>>>>>>>> Daniel Lichtblau
>>>>>>>>> Wolfram Research
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Re: Simplify with NestedLessLess?
  • Next by Date: Re: Re: More /.{I->-1} craziness
  • Previous by thread: Re: Re: Simplify with NestedLessLess?
  • Next by thread: Re: Re: Simplify with NestedLessLess?