[npl] / trunk / NationalProblemLibrary / Rochester / setDiffEQ9Linear2ndOrderHomog / ur_de_9_18.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setDiffEQ9Linear2ndOrderHomog/ur_de_9_18.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 184 - (download) (annotate)
Fri Apr 28 13:46:21 2006 UTC (7 years ago) by jjholt
File size: 1312 byte(s)
Added tags.  --JH

    1 ## DESCRIPTION
    2 ## Calculus
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('differential equation' 'second order' 'linear')
    6 ## Tagged by tda2d
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Second-Order Differential Equations')
   10 ## DBsection('Second-Order Linear Equations')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('Rochester')
   14 ## TitleText1('')
   15 ## EditionText1('')
   16 ## AuthorText1('')
   17 ## Section1('')
   18 ## Problem1('')
   19 
   20 
   21 DOCUMENT() ;
   22 
   23 loadMacros(
   24 "PG.pl",
   25 "PGbasicmacros.pl",
   26 "PGchoicemacros.pl",
   27 "PGanswermacros.pl",
   28 "PGauxiliaryFunctions.pl",
   29 "PGdiffeqmacros.pl",
   30 ) ;
   31 ############
   32 
   33 
   34 TEXT(beginproblem()) ;
   35 
   36 $showPartialCorrectAnswers = 1 ;
   37 
   38 $r1 = random(2,9,1);
   39 $r2 = random(-9,-1,1);
   40 while(($r1 + $r2 == 0) or ($r1 + $r2 == 1) or ($r1 + $r2 == 2)) { $r2 = random(-9,-1,1); }
   41 
   42 $a = 1 - $r1 - $r2;
   43 $b = $r1 * $r2;
   44 
   45 $d = random(-10,10,1);
   46 $c = random(-10,10,1);
   47 while (($c == $r1 * $d) or ($c == $r2 * $d)) { $c = random(-10,10,1); }
   48 
   49 $eq = FEQ("x^2 y'' + $a x y' + $b y = 0");
   50 
   51 $k1 = ($c - $r2 * $d)/($r1 - $r2);
   52 $k2 = ($c - $r1 * $d)/($r2 - $r1);
   53 
   54 $ans = FEQ("$k1 * x**$r1 + $k2 * x**$r2");
   55 
   56 BEGIN_TEXT
   57 
   58 Find \(y\) as a function of \(x\) if \[ $eq, \]
   59 $BR
   60 \( y(1)=$d, \ \ y'(1)=$c. \)
   61 $BR
   62 \(y=\)\{ans_rule(20)\}
   63 
   64 END_TEXT
   65 
   66 ANS(fun_cmp($ans));
   67 
   68 ENDDOCUMENT() ;
   69 
   70 
   71 
   72 
   73 
   74 
   75 ##################################################

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9