[LON-CAPA-users] Imaginary Numbers

Harding, Gene L glhardin at purdue.edu
Thu Feb 18 14:14:08 EST 2016


Hi Rex,

Thanks for the info.  It is an ECET course in electromagnetics focused on applications.  The objective of this particular problem is to find the input impedance of a lossless microstrip line, on a printed circuit board, terminated in a complex impedance (resistance and capacitance).  It is a fairly straightforward problem, but requires complex numbers, which I had never used before in LC.

Best regards,

Gene L. Harding, PE
Associate Professor of ECET
574-520-4190


-----Original Message-----
From: lon-capa-users-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at mail.lon-capa.org] On Behalf Of Rex Abert
Sent: Thursday, February 18, 2016 12:48 PM
To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] Imaginary Numbers

Gene-

In my precalculus class, one section covered is root finding for polynomials.  Some of the problems are written with one complex conjugate pair of solutions.  I want the student to enter the zeros, one per text box, without regard to order.  I treat "i" as a variable and use samples.  (It isn't necessarily "correct" mathematically, but it gets the job done.) 

I also use a <formularesponse> as follows:

<formularesponse samples="i at -5:5#4" id="12">
	<responseparam name="tol" default=".1%" type="tolerance" description="Numerical Tolerance" />
        <answergroup type="unordered">
            <answer name="both" type="unordered">
              <value>$z1</value><value>$z2</value>
              <value>$c</value><value>$d</value>
            </answer>
        </answergroup>
	<textline size="10" /> <textline size="10" />	<textline size="10" /> <textline size="10" />
</formularesponse>

$z1 and $z2 are the imaginary zeros, $c and $d are the real zeros.

I'm chiming in here, because, as is so often the case in LC, there is more than one way to do it.  If I might ask, what is it that you want to do with complex numbers? Knowing this will help guide the responses from the community.

Rex Abert
Associate Professor of Mathematics
Tallahassee Community College
________________________________________
From: lon-capa-users-bounces at mail.lon-capa.org [lon-capa-users-bounces at mail.lon-capa.org] on behalf of Harding, Gene L [glhardin at purdue.edu]
Sent: Thursday, February 18, 2016 11:26 AM
To: Discussion list for LON-CAPA users
Subject: Re: [LON-CAPA-users] Imaginary Numbers

Hi Damien,
I was using a similar approach, but yours is more elegant, so I have modified mine.  Thanks for the info!
Best regards,

Gene L. Harding, PE
Associate Professor of ECET
574-520-4190


-----Original Message-----
From: lon-capa-users-bounces at mail.lon-capa.org [mailto:lon-capa-users-bounces at mail.lon-capa.org] On Behalf Of Damien Guillaume
Sent: Thursday, February 18, 2016 10:39 AM
To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Subject: Re: [LON-CAPA-users] Imaginary Numbers

> I am still having trouble with the response portion.  Is there a way to get "numericalresponse" to handle a complex number?  If not, is the technique Justin suggested using Maxima a good route?  Or is it best to just break the response into two "numericalresponses", one for the real part and one for the imaginary part?

If you are just asking for a complex number, and you don't mind giving a hint that there might be an imaginary part, you could also use a single numerical response asking for 2 values (ordered), like that:

<problem>
   <startouttext/>Enter 1+2i:<endouttext/>
   <numericalresponse>
     <answergroup type="ordered">
       <answer>
         <value>1</value>
         <value>2</value>
       </answer>
     </answergroup>
     <textline size="5" readonly="no"/>
     <startouttext/>+<endouttext/>
     <textline size="5" readonly="no"/>
     <startouttext/>i<endouttext/>
   </numericalresponse>
</problem>

Damien
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users


More information about the LON-CAPA-users mailing list