Forum archive 2000-2006

kcline@c... - Indefinite Integrals

by Arnold Pizer -
Number of replies: 0
 Indefinite Integrals topic started 3/2/2006; 4:11:40 PMlast post 3/2/2006; 11:27:50 PM
 kcline@c... - Indefinite Integrals  3/2/2006; 4:11:40 PM (reads: 379, responses: 1) Apologies & Disclaimer: This is probably in an faq somewhere, but I can't find it, and I am a real newbie with all this, but... I want to assign a problem involving an indefinite integral where the students put a +C at the end of their answer. Is this possible? The problems that I've found use function_cmp_up_to_constant, which is great for checking antiderivatives. However I want real indefinite integrals, where the answer must have a +C on the end in order for the problem to be marked correct. How do you do that? Thanks in advance! --Kelly Cline <| Post or View Comments |>

 Gavin LaRose - Re: Indefinite Integrals  3/2/2006; 11:27:50 PM (reads: 522, responses: 0) Hi Kelly, A not very elegant solution is to use fun_cmp or fun_cmp_up_to_constant and just include C as an additional variable. For example,  $$\int x^2\,dx$$ = \{ ans_rule(35) \} $BR${BITALIC}(Use the capital letter "C" for any constant that you may need in your answer.)\$EITALIC ... ANS( fun_cmp( "2*x", 'var'=>['x','C'], 'mode'=>'antider' ) ); This is what I've been doing in this case; a more elegant solution would be to use the Parser explicitly and declare C to be a constant. But I'd have to go and look that one up, so I'll leave it to someone else to elucidate. Cheers, Gavin <| Post or View Comments |>